-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbot.py
More file actions
56 lines (45 loc) · 1.7 KB
/
bot.py
File metadata and controls
56 lines (45 loc) · 1.7 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
56
from model import *
import os
import discord
#from scoretable import scoreboard
#from dotenv import load_dotenv
#load_dotenv()
#TOKEN = os.getenv('DISCORD_TOKEN')
image_types = ["png", "jpeg", "gif", "jpg"]
TOKEN =""
GUILD="testing"
from discord.ext import commands
#bot = commands.Bot(command_prefix='$')
client = discord.Client()
@client.event
async def on_ready():
print(f'{client.user} has connected to Discord!')
for guild in client.guilds:
#print(f'{guild} has connected the bot')
#print(guild.members)
if guild.name == GUILD:
print("Bonjour")
break
@client.event
async def on_message(message):
if message.author == client.user:
return
for attachment in message.attachments:
if any(attachment.filename.lower().endswith(image) for image in image_types):
await attachment.save("sample.png")
filter_func("sample.png")
#display toonify
await message.channel.send(file=discord.File("toonify.jpg"))
await message.channel.send(file=discord.File("blackwhite.jpg"))
if message.content.startswith('>help'):
message2='This bot is currently in development, '+str(message.author)[:-5]+'.The commands availabe are >hi , >click a pic'
await message.channel.send('{}'.format(message2))
if 'anime' in message.content:
await message.channel.send("Roses are red,violets are blue,try out this bot,so that your eyes shine with the animefy hue")
# if 'anime' in message.content:
# await message.channel.send("you'll surely love this bot,don't forget to give it a try")
'''@bot.command()
async def test(ctx, arg):
ctx.send(arg)
'''
client.run(TOKEN)