automatically let everyone use bot
This commit is contained in:
parent
149d55d77f
commit
64366ce071
@ -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>> {
|
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!(
|
sqlx::query!(
|
||||||
"
|
"
|
||||||
INSERT INTO servers (id, name)
|
INSERT INTO servers (id, name)
|
||||||
|
Loading…
Reference in New Issue
Block a user