@@ -165,15 +165,15 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
165165 . next ( )
166166 . await ;
167167
168- let mci = match collector {
168+ let interaction = match collector {
169169 Some ( i) => i,
170170 None => break ,
171171 } ;
172172
173- match mci . data . custom_id . as_str ( ) {
173+ match interaction . data . custom_id . as_str ( ) {
174174 "reset" => {
175175 filters = SearchFilters :: default ( ) ;
176- mci . create_response (
176+ interaction . create_response (
177177 & ctx. serenity_context ( ) . http , UpdateMessage (
178178 CreateInteractionResponseMessage :: new ( )
179179 . embed ( create_success_embed ( "Reset all filter rules!" , Some ( start_time) ) )
@@ -185,7 +185,7 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
185185 continue ;
186186 }
187187 "search" => {
188- mci . create_response ( & ctx. serenity_context ( ) . http , UpdateMessage (
188+ interaction . create_response ( & ctx. serenity_context ( ) . http , UpdateMessage (
189189 CreateInteractionResponseMessage :: new ( )
190190 . embed ( create_loading_embed ( "searching..." ) )
191191 . components ( vec ! [ ] )
@@ -194,7 +194,7 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
194194 match search_servers ( filters. clone ( ) , 200 ) . await {
195195 // Found server
196196 Ok ( Some ( servers) ) => {
197- mci . edit_response (
197+ interaction . edit_response (
198198 & ctx. serenity_context ( ) . http ,
199199 EditInteractionResponse :: new ( )
200200 . embed ( create_success_embed ( & format ! ( "Found {} servers" , servers. len( ) ) , Some ( start_time) ) )
@@ -212,7 +212,7 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
212212 )
213213 . color ( 0xff0000 ) ;
214214
215- mci . edit_response (
215+ interaction . edit_response (
216216 & ctx. serenity_context ( ) . http ,
217217 EditInteractionResponse :: new ( )
218218 . embed ( embed)
@@ -223,7 +223,7 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
223223 } ,
224224 // Database error
225225 Err ( err) => {
226- mci . edit_response (
226+ interaction . edit_response (
227227 & ctx. serenity_context ( ) . http ,
228228 EditInteractionResponse :: new ( ) . embed ( create_error_embed ( "Database error" , Some ( start_time) ) )
229229 ) . await ?;
@@ -233,8 +233,8 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
233233 return Ok ( ( ) ) ;
234234 }
235235 "server_filter" => {
236- if let ComponentInteractionDataKind :: StringSelect { values } = & mci . data . kind {
237- mci . create_response ( & ctx. serenity_context ( ) . http , UpdateMessage (
236+ if let ComponentInteractionDataKind :: StringSelect { values } = & interaction . data . kind {
237+ interaction . create_response ( & ctx. serenity_context ( ) . http , UpdateMessage (
238238 CreateInteractionResponseMessage :: new ( )
239239 . embed ( create_loading_embed ( "processing the input..." ) )
240240 . components ( vec ! [ ] )
@@ -246,7 +246,7 @@ pub async fn open_filter_ui(ctx: Context<'_>, reply: ReplyHandle<'_>) -> Result<
246246 }
247247 }
248248 _ => {
249- mci . defer ( & ctx. serenity_context ( ) . http ) . await ?;
249+ interaction . defer ( & ctx. serenity_context ( ) . http ) . await ?;
250250 }
251251 }
252252 }
0 commit comments