Basic guild_popin
This commit is contained in:
@@ -4,6 +4,8 @@ use serenity::model::prelude::Guild;
|
||||
use serenity::prelude::Context;
|
||||
use serenity::prelude::*;
|
||||
|
||||
use crate::utils::*;
|
||||
|
||||
pub struct Handler;
|
||||
|
||||
#[async_trait]
|
||||
@@ -14,11 +16,17 @@ impl EventHandler for Handler {
|
||||
// private channels, and more.
|
||||
//
|
||||
// In this case, just print what the current user's username is.
|
||||
async fn ready(&self, _ctx: Context, ready: Ready) {
|
||||
async fn ready(&self, ctx: Context, ready: Ready) {
|
||||
println!("{} is connected!", ready.user.name);
|
||||
println!("Initialize guild voice popin state");
|
||||
|
||||
guildPopin::init(ctx).await;
|
||||
}
|
||||
|
||||
async fn guild_create(&self, _ctx: Context, guild: Guild, _new: bool) {
|
||||
println!("Guild joined: {}", guild.name);
|
||||
async fn guild_create(&self, ctx: Context, guild: Guild, _new: bool) {
|
||||
println!("Guild joined: {}", guild.name);
|
||||
|
||||
guildPopin::addGuild(ctx, guild).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user