Restructure guilds table

This commit is contained in:
jude
2025-05-23 22:04:21 +01:00
parent 19cfacffe5
commit 06041ba184
20 changed files with 85 additions and 96 deletions

View File

@ -144,12 +144,10 @@ pub async fn guild_command_macro(ctx: &Context<'_>, name: &str) -> Option<Comman
let row = sqlx::query_as!(
Row,
"
SELECT m.name, m.description, m.commands
SELECT name, description, commands
FROM command_macro m
INNER JOIN guilds g
ON g.id = m.guild_id
WHERE guild = ?
AND m.name = ?
WHERE guild_id = ?
AND name = ?
",
ctx.guild_id().unwrap().get(),
name