mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-23 11:13:51 -05:00
[V3] Custom context class (#988)
* Create custom context class * Documentation * Remove old help method, replace with new * Update from rebase
This commit is contained in:
@@ -136,7 +136,7 @@ class Core:
|
||||
async def _set(self, ctx):
|
||||
"""Changes Red's settings"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await ctx.bot.send_cmd_help(ctx)
|
||||
await ctx.send_help()
|
||||
|
||||
@_set.command()
|
||||
@checks.guildowner()
|
||||
@@ -207,7 +207,7 @@ class Core:
|
||||
try:
|
||||
status = statuses[status.lower()]
|
||||
except KeyError:
|
||||
await ctx.bot.send_cmd_help(ctx)
|
||||
await ctx.send_help()
|
||||
else:
|
||||
await ctx.bot.change_presence(status=status,
|
||||
game=game)
|
||||
@@ -229,7 +229,7 @@ class Core:
|
||||
game = discord.Game(type=1, url=streamer, name=stream_title)
|
||||
await ctx.bot.change_presence(game=game, status=status)
|
||||
elif streamer is not None:
|
||||
await ctx.bot.send_cmd_help(ctx)
|
||||
await ctx.send_help()
|
||||
return
|
||||
else:
|
||||
await ctx.bot.change_presence(game=None, status=status)
|
||||
@@ -267,7 +267,7 @@ class Core:
|
||||
async def prefix(self, ctx, *prefixes):
|
||||
"""Sets Red's global prefix(es)"""
|
||||
if not prefixes:
|
||||
await ctx.bot.send_cmd_help(ctx)
|
||||
await ctx.send_help()
|
||||
return
|
||||
prefixes = sorted(prefixes, reverse=True)
|
||||
await ctx.bot.db.prefix.set(prefixes)
|
||||
|
||||
Reference in New Issue
Block a user