Add permission checks to p.prefix command
This commit is contained in:
+7
-1
@@ -113,6 +113,7 @@ use clap::Parser;
|
||||
use notify::{Event, EventKind, Watcher};
|
||||
use tokio::net::TcpListener;
|
||||
use tower_http::services::ServeDir;
|
||||
use twilight_cache_inmemory::ResourceType;
|
||||
use twilight_gateway::{Intents, ShardId};
|
||||
|
||||
use crate::{
|
||||
@@ -227,7 +228,7 @@ async fn start(
|
||||
.await
|
||||
.expect("Could not connect to the database!");
|
||||
|
||||
log::info!("Database connection established successfully!");
|
||||
log::info!("Database connection established successfully.");
|
||||
|
||||
let state = State { db };
|
||||
|
||||
@@ -235,6 +236,7 @@ async fn start(
|
||||
.shard(shard)
|
||||
.intent(Intents::GUILDS)
|
||||
.intent(Intents::GUILD_MESSAGES)
|
||||
.intent(Intents::GUILD_MEMBERS)
|
||||
.intent(Intents::MESSAGE_CONTENT)
|
||||
.command(HelpCommand)
|
||||
.command(CallCommand::new())
|
||||
@@ -243,6 +245,10 @@ async fn start(
|
||||
.command(FriendRequestCommand)
|
||||
.command(PrefixCommand)
|
||||
.component(HelpGoBackButton)
|
||||
.cache_resource_type(ResourceType::GUILD)
|
||||
.cache_resource_type(ResourceType::CHANNEL)
|
||||
.cache_resource_type(ResourceType::MEMBER)
|
||||
.cache_resource_type(ResourceType::ROLE)
|
||||
.on_ready(ReadyHandler)
|
||||
.on_reconnect(ReconnectHandler)
|
||||
.on_message(CallMessageHandler)
|
||||
|
||||
Reference in New Issue
Block a user