-
Notifications
You must be signed in to change notification settings - Fork 0
/
the_thing.py
36 lines (28 loc) · 1.33 KB
/
the_thing.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
import os
import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
import time
Client = discord.Client()
client = commands.Bot(command_prefix = "!")
@client.event
async def on_ready():
print("Bot is online and connected to Discord")
@client.event
async def on_message(message):
if message.content.upper().startswith('!PING'):
userID = message.author.id
await client.send_message(message.channel, "<@%s> Pong!" % (userID))
if message.content.upper().startswith('!SAY'):
if message.author.id == "226055578236092417": #Replace <User ID> with the ID of the user you want to be able to execute this command!
args = message.content.split(" ")
await client.send_message(message.channel, "%s" % (" ".join(args[1:])))
else:
await client.send_message(message.channel, "You do not have permission")
if message.content.upper().startswith('!AMIADMIN'):
if "421655534375010324" in [role.id for role in message.author.roles]: #Replace <Role ID> with the ID of the role you want to be able to execute this command
await client.send_message(message.channel, "You are an admin")
else:
await client.send_message(message.channel, "You are not an admin")
client.run(os.getenv('TOKEN'))