mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Some improvements
This commit is contained in:
parent
8022ac2cd3
commit
b39557ffed
1 changed files with 16 additions and 9 deletions
|
@ -185,7 +185,7 @@ async def on_ready():
|
|||
async def on_message(message: discord.Message):
|
||||
global voice_client
|
||||
global voice_player
|
||||
if not message.content.startswith("!"):
|
||||
if message.channel != client.get_channel(config["Discord"]["main_channel"]):
|
||||
return
|
||||
sentry.user_context({
|
||||
"discord": {
|
||||
|
@ -194,7 +194,12 @@ async def on_message(message: discord.Message):
|
|||
"discriminator": message.author.discriminator
|
||||
}
|
||||
})
|
||||
if message.content.startswith("!"):
|
||||
if not message.content.startswith("!") and not message.author.bot:
|
||||
client.send_message(message.channel,
|
||||
":warning: In questa chat sono consentiti solo comandi per il bot.\n"
|
||||
"Riinvia il tuo messaggio in <#425780562805129226>!")
|
||||
client.delete_message(message)
|
||||
return
|
||||
data = message.content.split(" ")
|
||||
if data[0] not in commands:
|
||||
await client.send_message(message.channel, ":warning: Comando non riconosciuto.")
|
||||
|
@ -526,6 +531,8 @@ commands = {
|
|||
"!cv": cmd_cv,
|
||||
"!play": cmd_play,
|
||||
"!p": cmd_play,
|
||||
"!search": cmd_play,
|
||||
"!file": cmd_play,
|
||||
"!skip": cmd_skip,
|
||||
"!s": cmd_skip,
|
||||
"!remove": cmd_remove,
|
||||
|
|
Loading…
Reference in a new issue