Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

added dick command in nsfw cog #205

Open
wants to merge 8 commits into
base: rewrite
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions cogs/community/nsfw.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ async def __local_check(self, ctx):
return False
return True

class Dick:

def init(self, bot):
self.bot = bot

def dick_size(self, id):
s = 0
while id:
s += id % 10
id //= 10
return (s%10) * 2

@commands.group(invoke_without_command=True)
async def nsfw(self, ctx):
""" Get random lewds from the web """
Expand Down Expand Up @@ -121,6 +133,17 @@ async def gel(self, ctx):
except Exception as e:
await ctx.send(f'```{e}```')

@commands.command(pass_context=True)
async def dick(self, ctx, mention=""):
"""How big are you?"""
id_regex = re.compile('<@!?(\d+)>')
ids = id_regex.findall(ctx.message.content)
if len(ids) > 0:
for member in ids:
await ctx.send(' <@{}> Size: 8{}D'.format(member, self.dick_size(int(member)) * '='))
else:
await ctx.send(' <@{}> Size: 8{}D'.format(str(ctx.message.author.id), self.dick_size(ctx.message.author.id) * '='))

@nsfw.command()
async def gif(self, ctx, *, tag):
""" Get a random lewd gif
Expand Down