Kaynağa Gözat

Fixed a docstring, added another, changed a converter to make more sense but functionally stay the same.

tags/v2.0.0
Roxie Gibson 5 yıl önce
ebeveyn
işleme
63fb4160c2
3 değiştirilmiş dosya ile 6 ekleme ve 5 silme
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -1
      roxbot/cogs/util.py
  3. +3
    -4
      roxbot/converters.py

+ 1
- 0
CHANGELOG.md Dosyayı Görüntüle

@@ -14,6 +14,7 @@
### Regular Updates
#### New Features
- 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
- Roxbot will remove all redundant settings (removed roles from self assign, etc.).

+ 2
- 1
roxbot/cogs/util.py Dosyayı Görüntüle

@@ -203,7 +203,7 @@ class Util():
@commands.command(aliases=["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:
;emote [emote]
"""
@@ -236,6 +236,7 @@ class Util():
@commands.command()
@commands.is_owner()
async def echo(self, ctx, channel: discord.TextChannel, *, message: str):
"""Repeats after you, Roxie."""
await channel.send(message)
return await ctx.send(":point_left:")


+ 3
- 4
roxbot/converters.py Dosyayı Görüntüle

@@ -55,12 +55,11 @@ class User(commands.UserConverter):
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):
try:
return await super().convert(ctx, argument)
return await commands.EmojiConverter().convert(ctx, argument)
except commands.errors.BadArgument:
return await commands.PartialEmojiConverter().convert(ctx, argument)


Yükleniyor…
İptal
Kaydet