aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cogs/src.py10
-rw-r--r--cogs/trans.py3
-rw-r--r--custom_commands.json6
3 files changed, 11 insertions, 8 deletions
diff --git a/cogs/src.py b/cogs/src.py
index f0619d4..ff31cfb 100644
--- a/cogs/src.py
+++ b/cogs/src.py
@@ -208,7 +208,7 @@ class Src(commands.Cog):
@commands.guild_only()
async def pending(self, ctx):
async with ctx.typing():
- await self.bot.get_channel(699713639866957905).purge()
+ await self.bot.get_channel(699713639866957905).purge(limit=500)
await pendingRuns(self, ctx)
@commands.command(description="Reject runs quickly")
@@ -232,9 +232,11 @@ class Src(commands.Cog):
@commands.command()
async def verify(self, ctx, apiKey=None, userID=None):
self.bot.messageBlacklist.append(ctx.message.id)
- #if apiKey == None:
- # await ctx.send(f"Please try again this command by getting an apiKey from https://www.speedrun.com/api/auth then do `{ctx.prefix}verify <apiKey>` in my DMs or anywhere in this server. \nBe careful who you share this key with. To learn more check out https://github.com/speedruncomorg/api/blob/master/authentication.md")
- # return
+ if apiKey == None:
+ data = json.loads(Path('./api_keys.json').read_text())
+ if not str(ctx.author.id) in data:
+ await ctx.send(f"Please try again this command by getting an apiKey from https://www.speedrun.com/api/auth then do `{ctx.prefix}verify <apiKey>` in my DMs or anywhere in this server. \nBe careful who you share this key with. To learn more check out https://github.com/speedruncomorg/api/blob/master/authentication.md")
+ return
if ctx.guild != None:
await ctx.message.delete()
async with ctx.typing():
diff --git a/cogs/trans.py b/cogs/trans.py
index 2c6ed71..9c5d307 100644
--- a/cogs/trans.py
+++ b/cogs/trans.py
@@ -20,6 +20,7 @@ async def translateMsg(text, target="en"):
result['translatedText'] = result['translatedText'].replace("&#39;", "'")
result['translatedText'] = result['translatedText'].replace("&quot;", '"')
result['translatedText'] = result['translatedText'].replace("<@! ", "<@!")
+ result['translatedText'] = result['translatedText'].replace("<@ ", "<@")
result['translatedText'] = result['translatedText'].replace("<# ", "<#")
return result;
@@ -28,7 +29,7 @@ class Trans(commands.Cog):
def __init__(self, bot):
self.bot = bot
- @commands.command(help="Translate text in english (using google translate)", brief="Translate to english")
+ @commands.command(help="Translate text in english (using google translate)", brief="Translate to english", aliases=["翻译", "脑热", "动漫"])
async def translate(self, ctx, *, message):
response = await translateMsg(message)
embed=discord.Embed(title="Translation",description=f"{ctx.message.author.mention} says:", timestamp=ctx.message.created_at, color=0x4d9aff)
diff --git a/custom_commands.json b/custom_commands.json
index 736cda3..f0a3d4b 100644
--- a/custom_commands.json
+++ b/custom_commands.json
@@ -33,7 +33,7 @@
"!toxicitypass": "```TOXICITY PASS\n\nTHE HOLDER OF THIS PASS HAS PERMISSION FROM THE HEAVENS ABOVE TO DO AND SAY WHATEVER THE HELL THEY WANT\nTHEY ARE ALLOWED TO BE AS TOXIC AS THEY WILL WITHOUT REPERCUSSIONS\n\nPASS OWNER: Duck W aka Weexy aka Indy Kambeitz```",
"!welcome": "Welcome! <:mango:715738087627685908>",
"!learntoread": "When two players are tied on the leaderboards **ONLY ONE FUCKER WILL BE VISIBLE**",
- "!src": "https://www.speedrun.com/mcbe",
"!mobiledupe": "1) place item to dupe in the crafting grid\n2) keep pressed until the green bar thing appears\nclick any \"Impossible\" craft (red ones)\n3)press the item to dupe (that is in your hotbar now -> it should have moved there since you pressed the impossible craft)\n4)your item should be duped",
- "!source": "https://github.com/AnInternetTroll/mcbeDiscordBot"
-}
+ "!source": "https://github.com/AnInternetTroll/mcbeDiscordBot",
+ "!sr.c": "https://www.speedrun.com/mcbe"
+} \ No newline at end of file
n class='insertions'>+0 2021-05-24Add user-agent for xboxuser commandaninternettroll1-1/+3 2021-04-04Minor changesAnInternetTroll1-5/+17 2021-04-04ReformattingAnInternetTroll2-32/+48 2021-04-01Update utils.pySamot191-1/+1 2021-04-01Fair Leaderboard Samot191-8/+53 2021-03-26+ Fix "shut" emojiAhmad Ansori Palembani1-1/+1 2021-03-23Fix typo, add punctuation, and make wording clearer.Samot191-7/+7 2021-03-21Get only the queue, not everythingrandomidiot131-1/+1 2021-03-21Add !queuerandomidiot131-0/+44 2021-03-20remove embed from run rejection messageSkycloudd1-1/+1 2021-03-16hopefully fixed the ultraxd thingSkycloudd1-1/+1 2021-03-05Tabs to spacesMango0x451-526/+541 2021-03-05Educate new members on input rulesMango0x451-535/+526 2021-02-28Make !pending not max out at 200 runs per gamerandomidiot131-5/+16 2021-02-27Update aiohttp due to security vulnerabilityMango0x452-1/+2 2021-02-24Make !verified asynchronousAnInternetTroll2-38/+36 2021-02-20Add verified commandrandomidiot131-0/+45 2021-02-13Whitelist coop all bosses when rejecting spamMango0x451-1/+1 2021-02-13Remove useless importsMango0x454-6/+1 2021-02-13Add better spam preventionMango0x451-15/+22 2021-02-13Remove useless dependenciesMango0x451-10/+8