automatically let everyone use bot

This commit is contained in:
jude-lafitteIII 2020-05-20 22:48:01 +01:00
parent 149d55d77f
commit 64366ce071

View File

@ -33,6 +33,16 @@ SELECT id, name, prefix, volume
}
pub async fn create_from_guild(guild: Guild, db_pool: MySqlPool) -> Result<GuildData, Box<dyn std::error::Error>> {
sqlx::query!(
"
INSERT INTO roles (guild_id, role)
VALUES (?, ?)
",
guild.id.as_u64(), guild.id.as_u64()
)
.execute(&db_pool)
.await?;
sqlx::query!(
"
INSERT INTO servers (id, name)