def notifications(self, ctx, channel: discord.Channel):
"""This command is used to set a channel as the server's 'notifications' channel
Any notifications (like someone going live on Twitch, or Picarto) will go to that channel
EXAMPLE: !alerts #alerts
RESULT: No more alerts spammed in #general!"""
if str(channel.type) != "text":
await self.bot.say("The notifications channel must be a text channel!")
return
key = ctx.message.server.id
entry = {'server_id': key,
'notification_channel': channel.id}
if not await utils.update_content('server_settings', entry, key):
await utils.add_content('server_settings', entry)
await self.bot.say("I have just changed this server's 'notifications' channel"
"\nAll notifications will now go to `{}`".format(channel))
评论列表
文章目录