Bampersand::DATABASE.exec"insert into perms values (?,?,?)",guild_id.to_i64,@@perms[guild_id][Level::Admin]?.try(&.to_i64),@@perms[guild_id][Level::Moderator]?.try(&.to_i64)
Bampersand::DATABASE.exec(
"insert into perms values (?,?,?)",guild_id.to_i64,
"Displays stats about Bampersand and links to further resources.",
Perms::Level::User)do|args,ctx|
Commands.register_command("about","Displays stats about Bampersand and links to further resources.",Perms::Level::User)do|args,ctx|
uptime=Time.monotonic-Bampersand::STARTUP
{
title:"**BAMPERSAND VERSION #{Bampersand::VERSION}**",
text:"This is a simple utility bot for Discord powered by [Crystal](https://crystal-lang.org).\nYou can take a peek <:blobpeek:559732380697362482> at the [documentation](https://git.15318.de/Dingens/Bampersand/wiki/Home) and the [source code](https://git.15318.de/Dingens/Bampersand)!\nCurrently running on #{cache!.guilds.size} guilds, serving #{cache!.users.size} users.\nUptime is #{uptime.days}d #{uptime.hours}h #{uptime.minutes}m #{uptime.seconds}s. Bot operator is <@#{ENV["admin"]}>.",
Bampersand::DATABASE.query"select mod_id, text, timestamp from warnings where guild_id == ? and user_id == ?",ctx.guild_id.not_nil!.to_i64,target_user.id.to_u64.to_i64do|rs|
Bampersand::DATABASE.query(
"select mod_id, text, timestamp from warnings where guild_id == ? and user_id == ?",