-
Notifications
You must be signed in to change notification settings - Fork 0
/
iceberg.py
39 lines (34 loc) · 1.24 KB
/
iceberg.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
import discord
import json
import requests
import subprocess
import time
from organise import *
from functions import *
from discord.ext import commands
#load JSON config
config = json.load(open('config.json', 'r'))
# IceBerg.py
# Main python file, calls discord client and other stored functions from commands
#
#Standard DiscordPY setup
class MyClient(discord.Client):
async def on_ready(self):
print(f'Logged on as {self.user}!')
async def on_message(self, message):
if message.content == '/list':
await message.channel.send(getUserList())
if message.content.startswith('/locateUser'):
print("locate user command called")
await message.channel.send(embed=getUserLocation(message.content[12:]))
if message.content.startswith('/locateID'):
print("locate userID command called")
await message.channel.send(embed=getUserIDLocation(message.content[10:]))
if message.content.startswith('/getID'):
print("locate getID command called")
await message.channel.send(getID(message.content[7:]))
intents = discord.Intents.all()
intents.message_content = True
intents.members = True
client = MyClient(intents=intents)
client.run(config['token'])