Skip to content

Commit

Permalink
feat: /threads add_role command
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyko committed Aug 25, 2023
1 parent 581d31b commit 1a18996
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 143 deletions.
7 changes: 4 additions & 3 deletions chuckle-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ const BOT_EVENTS: EventTypeFlags = EventTypeFlags::from_bits_truncate(
| EventTypeFlags::CHANNEL_UPDATE.bits()
| EventTypeFlags::CHANNEL_DELETE.bits()
| EventTypeFlags::INTERACTION_CREATE.bits()
| EventTypeFlags::GUILD_VOICE_STATES.bits(),
| EventTypeFlags::GUILD_VOICE_STATES.bits()
| EventTypeFlags::GUILD_MEMBERS.bits(),
);

pub async fn create_gateway(state: ChuckleState, framework: ChuckleFramework) -> Result<()> {
let config = Config::builder(
CONFIG.discord_token.clone(),
Intents::GUILDS | Intents::GUILD_VOICE_STATES,
Intents::GUILDS | Intents::GUILD_VOICE_STATES | Intents::GUILD_MEMBERS,
)
.event_types(BOT_EVENTS)
.build();
Expand All @@ -38,7 +39,7 @@ pub async fn create_gateway(state: ChuckleState, framework: ChuckleFramework) ->

let state = state.clone();
let framework = framework.clone();
tokio::spawn(async move { handle_event(state, framework, event).await });
tokio::spawn(handle_event(state, framework, event));
}
}

Expand Down
Loading

0 comments on commit 1a18996

Please sign in to comment.