Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
backport to v3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Gelbpunkt committed Aug 12, 2019
1 parent 33aa7f3 commit 8977230
Show file tree
Hide file tree
Showing 49 changed files with 6,546 additions and 1,877 deletions.
6 changes: 5 additions & 1 deletion classes/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ async def delete_adventure(self, user):

async def start_guild_adventure(self, guild, difficulty, time):
await self.redis.execute(
"SET", f"guildadv:{guild}", difficulty, "EX", int(time.total_seconds()) + 259_200
"SET",
f"guildadv:{guild}",
difficulty,
"EX",
int(time.total_seconds()) + 259_200,
) # +3 days

async def get_guild_adventure(self, guild):
Expand Down
16 changes: 16 additions & 0 deletions cogs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ def predicate(ctx):
return commands.check(predicate)


def is_shoie():
def predicate(ctx):
return ctx.author.id == 423425457673863179

return commands.check(predicate)


class Custom(commands.Cog):
def __init__(self, bot):
self.bot = bot
Expand All @@ -52,6 +59,15 @@ async def ken(self, ctx, user: discord.Member):
)
await ctx.send(embed=em)

@is_shoie()
@commands.command(hidden=True)
async def slap(self, ctx, user: discord.Member):
"""[Shoie only] Slap someone."""
em = discord.Embed(
title=f"{ctx.disp} slapped {user.display_name}"
).set_image(url="https://media.giphy.com/media/keVd9WsqHg93O/giphy.gif")
await ctx.send(embed=em)


def setup(bot):
bot.add_cog(Custom(bot))
4 changes: 3 additions & 1 deletion cogs/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ async def equip(self, ctx, itemid: int):
).format(itemid=itemid, olditem=olditem["id"])
)
else:
await ctx.send(_("Successfully equipped item `{itemid}`.").format(itemid=itemid))
await ctx.send(
_("Successfully equipped item `{itemid}`.").format(itemid=itemid)
)

@checks.has_char()
@user_cooldown(3600)
Expand Down
4 changes: 3 additions & 1 deletion cogs/raid.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ async def raiddefend(self, ctx, bandits: int, group: str = "I"):
"https://raid.travitia.xyz/toggle",
headers={"Authorization": self.bot.config.raidauth},
)
bandits = [{"hp": random.randint(100, 190), "id": i + 1} for i in range(bandits)]
bandits = [
{"hp": random.randint(100, 190), "id": i + 1} for i in range(bandits)
]
payout = sum(i["hp"] for i in bandits)
await ctx.send(
f"""
Expand Down
1 change: 1 addition & 0 deletions idlerpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
5,
): # uvloop requires linux and min 3.5 Python
import uvloop

asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

bot = Bot(
Expand Down
Binary file modified locales/bg_BG/LC_MESSAGES/idlerpg.mo
Binary file not shown.
Loading

0 comments on commit 8977230

Please sign in to comment.