Spaces:
Sleeping
Sleeping
Rifat Azad commited on
Commit ·
3ff7d5a
1
Parent(s): 22e1201
update coinflip
Browse files- pydvpl_bot.py +91 -1
pydvpl_bot.py
CHANGED
|
@@ -6,6 +6,7 @@ import psutil
|
|
| 6 |
import discord
|
| 7 |
import requests
|
| 8 |
import socket
|
|
|
|
| 9 |
from datetime import datetime
|
| 10 |
from dotenv import load_dotenv
|
| 11 |
from discord.ext import commands, tasks
|
|
@@ -835,6 +836,96 @@ async def image(ctx, *, prompt: str):
|
|
| 835 |
#await ctx.reply(f"The command `image` was executed by - {ctx.author.mention}")
|
| 836 |
|
| 837 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 838 |
|
| 839 |
# UTILITY USER_CMD ------------------------------------------------------ END
|
| 840 |
|
|
@@ -1527,7 +1618,6 @@ async def purge(ctx, amount: int):
|
|
| 1527 |
# UTILITY MODERATOR_CMD ------------------------------------------------------ END
|
| 1528 |
|
| 1529 |
|
| 1530 |
-
|
| 1531 |
# RUN PYDVPL ------------------------------------------------------ START
|
| 1532 |
|
| 1533 |
|
|
|
|
| 6 |
import discord
|
| 7 |
import requests
|
| 8 |
import socket
|
| 9 |
+
import random
|
| 10 |
from datetime import datetime
|
| 11 |
from dotenv import load_dotenv
|
| 12 |
from discord.ext import commands, tasks
|
|
|
|
| 836 |
#await ctx.reply(f"The command `image` was executed by - {ctx.author.mention}")
|
| 837 |
|
| 838 |
|
| 839 |
+
# FUNCTION ------------------------------------------------------ SPLIT
|
| 840 |
+
|
| 841 |
+
|
| 842 |
+
@bot.hybrid_command()
|
| 843 |
+
async def coinflip(ctx):
|
| 844 |
+
coin_frames = [
|
| 845 |
+
"```\n"
|
| 846 |
+
" ___________\n"
|
| 847 |
+
" / \\\n"
|
| 848 |
+
"| |\n"
|
| 849 |
+
"| - |\n"
|
| 850 |
+
"| |\n"
|
| 851 |
+
" \\___________/\n"
|
| 852 |
+
"```",
|
| 853 |
+
"```\n"
|
| 854 |
+
" ___________\n"
|
| 855 |
+
" / \\\n"
|
| 856 |
+
"| |\n"
|
| 857 |
+
"| / |\n"
|
| 858 |
+
"| |\n"
|
| 859 |
+
" \\___________/\n"
|
| 860 |
+
"```",
|
| 861 |
+
"```\n"
|
| 862 |
+
" ___________\n"
|
| 863 |
+
" / \\\n"
|
| 864 |
+
"| |\n"
|
| 865 |
+
"| | |\n"
|
| 866 |
+
"| |\n"
|
| 867 |
+
" \\___________/\n"
|
| 868 |
+
"```",
|
| 869 |
+
"```\n"
|
| 870 |
+
" ___________\n"
|
| 871 |
+
" / \\\n"
|
| 872 |
+
"| |\n"
|
| 873 |
+
"| \\ |\n"
|
| 874 |
+
"| |\n"
|
| 875 |
+
" \\___________/\n"
|
| 876 |
+
"```",
|
| 877 |
+
"```\n"
|
| 878 |
+
" ___________\n"
|
| 879 |
+
" / \\\n"
|
| 880 |
+
"| |\n"
|
| 881 |
+
"| - |\n"
|
| 882 |
+
"| |\n"
|
| 883 |
+
" \\___________/\n"
|
| 884 |
+
"```",
|
| 885 |
+
"```\n"
|
| 886 |
+
" ___________\n"
|
| 887 |
+
" / \\\n"
|
| 888 |
+
"| |\n"
|
| 889 |
+
"| / |\n"
|
| 890 |
+
"| |\n"
|
| 891 |
+
" \\___________/\n"
|
| 892 |
+
"```",
|
| 893 |
+
"```\n"
|
| 894 |
+
" ___________\n"
|
| 895 |
+
" / \\\n"
|
| 896 |
+
"| |\n"
|
| 897 |
+
"| | |\n"
|
| 898 |
+
"| |\n"
|
| 899 |
+
" \\___________/\n"
|
| 900 |
+
"```",
|
| 901 |
+
"```\n"
|
| 902 |
+
" ___________\n"
|
| 903 |
+
" / \\\n"
|
| 904 |
+
"| |\n"
|
| 905 |
+
"| \\ |\n"
|
| 906 |
+
"| |\n"
|
| 907 |
+
" \\___________/\n"
|
| 908 |
+
"```",
|
| 909 |
+
"```\n"
|
| 910 |
+
" ___________\n"
|
| 911 |
+
" / \\\n"
|
| 912 |
+
"| |\n"
|
| 913 |
+
"| - |\n"
|
| 914 |
+
"| |\n"
|
| 915 |
+
" \\___________/\n"
|
| 916 |
+
"```"
|
| 917 |
+
]
|
| 918 |
+
|
| 919 |
+
flip_msg = await ctx.send("Flipping the coin...")
|
| 920 |
+
for frame in coin_frames:
|
| 921 |
+
await flip_msg.edit(content=frame)
|
| 922 |
+
|
| 923 |
+
result = random.choice(["Heads", "Tails"])
|
| 924 |
+
await flip_msg.edit(content=f"The result is.")
|
| 925 |
+
await flip_msg.edit(content=f"The result is..")
|
| 926 |
+
await flip_msg.edit(content=f"The result is...")
|
| 927 |
+
await flip_msg.edit(content=f"The result is **{result}**!")
|
| 928 |
+
|
| 929 |
|
| 930 |
# UTILITY USER_CMD ------------------------------------------------------ END
|
| 931 |
|
|
|
|
| 1618 |
# UTILITY MODERATOR_CMD ------------------------------------------------------ END
|
| 1619 |
|
| 1620 |
|
|
|
|
| 1621 |
# RUN PYDVPL ------------------------------------------------------ START
|
| 1622 |
|
| 1623 |
|