Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fight command #2

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions modules/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ def __init__(self, bot):
"<@{b}> unexpectedly received a big hug from <@{a}>",
"<@{a}> reached out their arms, wrapped them around <@{b}> and gave them a giant hug!"
]
self.fight_phrases = [
"<@{a}> fought with <@{b}> with a large fish.",
"<@{a}> tried to fight <@{b}>, but it wasn't very effective!",
"<@{a}> fought <@{b}>, but they missed.",
"<@{a}> fought <@{b}> with a piece of toast.",
"<@{a}> and <@{b}> are fighting with a pillow.",
"<@{a}> aimed but missed <@{b}> by an inch.",
"<@{b}> got duck slapped by <@{a}>",
"<@{a}> tried to dab on <@{b}> but they tripped, fell over, and now they need @ someone",
"<@{b}> was saved from <@{a}> by wumpus' energy!",
"Dabbit dabbed on <@{b}> from a request by <@{a}>!",
"Jet banned <@{a}> for picking a fight with <@{b}>!",
"<@{a}> joined the game.\n<@{a}>: That's not very cash money of you.\n<@{b}>: What\nCONSOLE: <@{b}> was banned by an operator.\n<@{b}> left the game.",
"<@{b}> tied <@{a}>’s shoelaces together, causing them to fall over.",
"You are the Chosen One <@{a}>. You have brought balance to this world. Stay on this path, and you will do it again for the galaxy. But beware your heart said master <@{b}>",
"<@{a}> used 'chat flood'. It wasn't very effective, so <@{b}> muted them."
]

@commands.command(cls=CustomCommand)
async def hug(self, ctx, person: discord.Member = None):
Expand All @@ -30,6 +47,19 @@ async def hug(self, ctx, person: discord.Member = None):
message = random.choice(self.hug_phrases)
return await ctx.send(message.format(a=str(ctx.author.id), b=str(person.id)))

@commands.command(cls=CustomCommand)
async def fight(self, ctx, person: discord.Member = None):
"""Fights someone."""
try:
await ctx.message.delete()
except:
pass
if not person:
return await ctx.send("<@{a}> tried to fight nobody, but the **V O I D** is unfightable, and could only stare back in return.".format(
a=ctx.author.id))
message = random.choice(self.fight_phrases)
return await ctx.send(message.format(a=str(ctx.author.id), b=str(person.id)))

@commands.command(cls=CustomCommand)
async def in_role(self, ctx, role_id):
roles= ctx.guild.roles
Expand Down