-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
55 lines (46 loc) · 1.51 KB
/
main.py
File metadata and controls
55 lines (46 loc) · 1.51 KB
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
import discord
from discord.ext import commands
import logging
from dotenv import load_dotenv
import os
import random
load_dotenv()
token = os.getenv('DISCORD_TOKEN')
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
intents.presences = True
bot = commands.Bot(command_prefix='/', intents=intents)
@bot.event
async def on_ready():
print(f'We have logged in as {bot.user} and want to die')
@bot.event
async def on_member_join(member):
await member.send(f'Great another one, hi {member.name}...')
@bot.event
async def on_message(message):
if message.author == bot.user:
return
if 'jakebot' in message.content.lower():
await message.delete()
random_responses = [
"Piss off",
"I do not want to talk to you",
"No",
"Hippity hoppity your ass is my property",
"Shoot that guy",
"heheheha",
"yea no",
"I don't care",
"Shut up",
"Leave me alone",
"*aggressively ignores you*"
]
await bot.process_commands(message)
#CS ping
@bot.event
async def on_presence_update(before, after):
if after.id == 327444985664241665 and str(after.status) == "online":
channel = bot.get_channel(1426024065327435786) # fill with channel id
await channel.send('JAKE')