### Regular Updates | ### Regular Updates | ||||
#### New Features | #### New Features | ||||
- Roxbot Facts! | - Roxbot Facts! | ||||
- Custom commands now have two new options. Prefix and Non-Prefix commands can have multiple outputs that can be choose at random. As well, a new type of prefix cc, embed, will allow custom rich embeds. | |||||
#### Minor Changes | #### Minor Changes | ||||
- Roxbot will remove all redundant settings (removed roles from self assign, etc.). | - Roxbot will remove all redundant settings (removed roles from self assign, etc.). |
@commands.command(aliases=["emoji"]) | @commands.command(aliases=["emoji"]) | ||||
async def emote(self, ctx, emote: roxbot.converters.Emoji): | async def emote(self, ctx, emote: roxbot.converters.Emoji): | ||||
""" | """ | ||||
Uploads the emote given. Useful for downloading emotes. | |||||
Displays info on the given emote. | |||||
Usage: | Usage: | ||||
;emote [emote] | ;emote [emote] | ||||
""" | """ | ||||
@commands.command() | @commands.command() | ||||
@commands.is_owner() | @commands.is_owner() | ||||
async def echo(self, ctx, channel: discord.TextChannel, *, message: str): | async def echo(self, ctx, channel: discord.TextChannel, *, message: str): | ||||
"""Repeats after you, Roxie.""" | |||||
await channel.send(message) | await channel.send(message) | ||||
return await ctx.send(":point_left:") | return await ctx.send(":point_left:") | ||||
return result | return result | ||||
class Emoji(commands.EmojiConverter): | |||||
"""The Emoji conveter from discord.py but instead it returns the argument if an error is raised | |||||
It's messier than using the EmojiConverter proper but the issue is you can try converters.""" | |||||
class Emoji(): | |||||
"""discord.Emoji converter for Roxbot. Is a combo of the EmojiConverter and PartialEmojiConverter converter classes.""" | |||||
async def convert(self, ctx, argument): | async def convert(self, ctx, argument): | ||||
try: | try: | ||||
return await super().convert(ctx, argument) | |||||
return await commands.EmojiConverter().convert(ctx, argument) | |||||
except commands.errors.BadArgument: | except commands.errors.BadArgument: | ||||
return await commands.PartialEmojiConverter().convert(ctx, argument) | return await commands.PartialEmojiConverter().convert(ctx, argument) | ||||