-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
123 lines (98 loc) · 3.28 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import os
import discord
from dotenv import load_dotenv
from discord.ext import commands
import random
# other files with commands
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
#bot intents
intents = discord.Intents().default()
intents.members = True
bot = commands.Bot(command_prefix= ['F!', 'f!'], intents=intents)
@bot.event
async def on_ready():
print(f'{bot.user.name} has connected to discord')
# a simple little hello
@bot.command(name='hello', help='says hello in a very friendly manner and most certainly doesnt ask for your teeth')
async def hello(ctx):
greet_options = [
"hello",
"greetings, human",
"IM ASSBELLS MCGEE GIMME YOUR TEETH",
]
response = random.choice(greet_options)
await ctx.send(response)
# copys what is said after the command
@bot.command(name='copycat', help='Replication of input')
async def copycat(ctx, *, message):
await ctx.send(f'you said: {message}')
# this command will use embeds and pictures when I figure them out
@bot.command(name='tarot', aliases=['Tarot', 'tatot'], help='draws a tarot card for you to answer a question. Only has Major arcana currently because I\'m lazy')
async def tarot(ctx, *, query):
cards = [
'The Fool',
'The Magician',
'The High Priestess',
'The Empress',
'The Hierophant',
'The Lovers',
'The Chariot',
'Strength',
'The Hermit',
'Wheel of Fortune',
'Justice',
'The Hanged Man',
'Death',
'Temperance',
'The Devil',
'The Tower',
'The Star',
'The Moon',
'The Sun',
'Judgement',
'The World',
]
if query == 'can i beat the shit out of you without getting closer?':
choice = 'The World'
else:
choice = random.choice(cards)
if choice == 'The World':
await ctx.send(f'{choice} is the answer to {query}.\n This means It Was Me, DIO!')
else:
await ctx.send(f'{choice} is the answer to {query}.\n I will tell you what this means once my brain is finished.')
# clear command
@bot.command()
async def clear (ctx, amount=1):
await ctx.channel.purge(limit=amount)
#little kick command for fun
@bot.command()
async def kick(ctx, member : discord.Member, *, reason=None):
await member.kick(reason=reason)
# we fuck around and find out (closed until I can figure out how to limit useability)
# @bot.command()
# async def ban(ctx, member : discord.Member, *, reason=None):
# await member.ban(reason=reason)
# # we unfuck
# @bot.command()
# async def unban(ctx, *, member):
# banned_users = await ctx.guild.bans()
# member_name, member_discriminator = member.split('#')
# for ban_entry in banned_users:
# user = ban_entry.user
# if (user.name, user.discriminator) == (member_name, member_discriminator):
# await ctx.guild.unban(user)
# return
#try new shit
@bot.command(aliases=['2ping'])
async def doubleping(ctx, member : discord.Member):
await ctx.send(f'pong! {member.mention}')
@bot.command()
async def ping(ctx, *, member):
users = await discord.Guild.members()
for i in users:
user = users.user
if user.name == member:
await ctx.send(f'pong! {user.mention}')
return
bot.run(TOKEN)