-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcajun.py
executable file
·33 lines (27 loc) · 1022 Bytes
/
cajun.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
#!/bin/python3 -u
import discord
import os
from dotenv import load_dotenv
from discord.ext import commands
load_dotenv()
client = commands.Bot(command_prefix='!')
@client.event
async def on_ready():
print('!cajun started on bot {0.user}'.format(client))
@client.event
async def on_message(message):
if message.channel.id == int(os.getenv('channel')):
return
content = message.content
if content.lower() == "!cajun":
if message.author == client.user:
if message.channel.id == int(os.getenv('botchan')):
cc_chan = client.get_channel(int(os.getenv('channel')))
await cc_chan.send("*Yes, Cajun received Rocky April 21, 2021.")
#await cc_chan.send("*Yes, Jerby is a big meanie.")
else:
await message.channel.send("Yes, Cajun received Rocky April 21, 2021.")
#await cc_chan.send("Yes, Jerby is a big meanie.")
else:
return
client.run(os.getenv('TOKEN'))