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 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::async_trait;
|
||||||
use serenity::model::channel::Message;
|
use serenity::model::channel::Message;
|
||||||
use serenity::prelude::*;
|
use serenity::prelude::*;
|
||||||
@@ -32,7 +32,7 @@ struct Handler;
|
|||||||
impl EventHandler for Handler {
|
impl EventHandler for Handler {
|
||||||
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
|
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
|
||||||
if let Interaction::Command(command) = 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,6 +104,9 @@ impl EventHandler for Handler {
|
|||||||
} else if let Interaction::Autocomplete(interaction) = interaction {
|
} else if let Interaction::Autocomplete(interaction) = interaction {
|
||||||
println!("Received 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() {
|
// let content = match interaction.data.name.as_str() {
|
||||||
// "game" => {
|
// "game" => {
|
||||||
// let games = vec!["Dota 2", "CS:GO", "PUBG"];
|
// let games = vec!["Dota 2", "CS:GO", "PUBG"];
|
||||||
|
|||||||
Reference in New Issue
Block a user