removed guild only hook. permissions on commands. fix for macro command count.

This commit is contained in:
jude
2022-05-13 08:59:46 +01:00
parent ded750aa2d
commit 1c1f5662d3
8 changed files with 104 additions and 52 deletions

View File

@ -59,7 +59,7 @@ impl Data {
guild_id: GuildId,
) -> Result<Vec<CommandMacro<Data, Error>>, Error> {
let rows = sqlx::query!(
"SELECT name, description FROM macro WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?)",
"SELECT name, description, commands FROM macro WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?)",
guild_id.0
)
.fetch_all(&self.database)
@ -67,7 +67,7 @@ impl Data {
guild_id,
name: row.name.clone(),
description: row.description.clone(),
commands: vec![]
commands: serde_json::from_str(&row.commands).unwrap(),
}).collect();
Ok(rows)