mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use reqwest::Url;
|
||||
use serenity::all::{ActivityData, CommandDataOption, CreateInteractionResponse, CreateInteractionResponseMessage, EditMessage, GuildId, Interaction};
|
||||
use serenity::all::{ActivityData, CreateInteractionResponse, CreateInteractionResponseMessage, EditMessage, GuildId, Interaction};
|
||||
use serenity::async_trait;
|
||||
use serenity::model::channel::Message;
|
||||
use serenity::prelude::*;
|
||||
@@ -32,7 +32,7 @@ struct Handler;
|
||||
impl EventHandler for Handler {
|
||||
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
|
||||
if let Interaction::Command(command) = interaction {
|
||||
if command.channel_id != config::CONFIG.discord_channel_id {
|
||||
if command.channel_id != config::CONFIG.discord_game_list_channel_id {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,9 @@ impl EventHandler for Handler {
|
||||
} else if let Interaction::Autocomplete(interaction) = interaction {
|
||||
println!("Received autocomplete interaction: {interaction:#?}");
|
||||
|
||||
// let mut message = interaction.channel_id.message(&ctx.http, config::CONFIG.discord_game_list_message_id).await.unwrap();
|
||||
// let mut categories = parse_games_list(&message.content).await;
|
||||
|
||||
// let content = match interaction.data.name.as_str() {
|
||||
// "game" => {
|
||||
// let games = vec!["Dota 2", "CS:GO", "PUBG"];
|
||||
|
||||
Reference in New Issue
Block a user