-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added first command accessible to every user, fixed illegal character bug, modified the help and developer commands, and changed the web page for uptimerobot
- Loading branch information
Showing
6 changed files
with
120 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import discord | ||
import asyncio | ||
from random import randint | ||
help_message = ''' | ||
**`roll: <amount>d<sides>`** Gets the combined total of <amount> dice with <sides> sides. | ||
''' | ||
|
||
|
||
async def roll(args, msg): | ||
channel = msg.channel | ||
if len(args) > 1: | ||
temp_msg = await msg.channel.send("Invalid ammount of arguments!") | ||
asyncio.sleep(2) | ||
await temp_msg.delete() | ||
else: | ||
data = args[0].split('d') | ||
ammount = int(data[0]) | ||
dice_type = int(data[1]) | ||
value = 0 | ||
for a in range(ammount): | ||
value += randint(1, dice_type) | ||
|
||
embed = discord.Embed( | ||
title='**Results**', | ||
description=f'You rolled `{str(value)}`!', | ||
color=0xfffb00 | ||
) | ||
embed.set_footer( | ||
text='Should I add a re-role option? ' | ||
'Email [email protected] to reply.' | ||
) | ||
await channel.send(embed=embed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ flask | |
asyncio | ||
motor | ||
emoji | ||
cryptography | ||
cryptography | ||
dnspython==1.16.0 |