diff --git a/Aash.py b/Aash.py new file mode 100644 index 0000000..e8aea8c --- /dev/null +++ b/Aash.py @@ -0,0 +1,14 @@ +import discord + +client = discord.Client() + +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if message.content == "!Hi": + await message.channel.send("Hello") + +client.run("NjMyMTMzMDA4MTc4MDIwMzUz.XaBAUQ.ySHJRsIiLUswtta8kXqRbZddXQ4") diff --git a/Chilli.py b/Chilli.py new file mode 100644 index 0000000..15793bf --- /dev/null +++ b/Chilli.py @@ -0,0 +1,26 @@ +import discord + +client = discord.Client() + +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if message.content == "!Hi": + await message.channel.send("Hello") + await message.channel.send("How are you feeling? \n{pick a number} \n1.tired,\n2. sad,\n3. apathetic,\n4. angry,\n5. happy ") + elif message.content == "1": + await message.channel.send("Quote relating to being tired.") + elif message.content == "2": + await message.channel.send("Quote relating sadness.") + elif message.content == "3": + await message.channel.send("Quote relating to apathy.") + elif message.content == "4": + await message.channel.send("Quote relating to anger.") + elif message.content == "5": + await message.channel.send("Quote relating to happiness.") + + +client.run("NjMyMTMzMDA4MTc4MDIwMzUz.XaBAUQ.ySHJRsIiLUswtta8kXqRbZddXQ4") diff --git a/Lucian.py b/Lucian.py new file mode 100644 index 0000000..e8aea8c --- /dev/null +++ b/Lucian.py @@ -0,0 +1,14 @@ +import discord + +client = discord.Client() + +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if message.content == "!Hi": + await message.channel.send("Hello") + +client.run("NjMyMTMzMDA4MTc4MDIwMzUz.XaBAUQ.ySHJRsIiLUswtta8kXqRbZddXQ4") diff --git a/MAIN FILE.py b/MAIN FILE.py new file mode 100644 index 0000000..36c04d1 --- /dev/null +++ b/MAIN FILE.py @@ -0,0 +1,13 @@ +import discord + +client = discord.Client() +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if "!HI" in message.content.upper(): + await message.channel.send("Hello") + +client.run("NjMyMTMzMDA4MTc4MDIwMzUz.XaSOeg.vmXqdHfduVBSW_voDMYCUjgUMmo") diff --git a/Nik.py b/Nik.py new file mode 100644 index 0000000..592814e --- /dev/null +++ b/Nik.py @@ -0,0 +1,33 @@ +import discord + +client = discord.Client() + +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if "!HI" in message.content.upper(): + await message.channel.send("Hello") + elif "!PURGE" in message.content.upper(): + global numToDelete + numToDelete = "" + counter = 0 + for character in message.content: + if character in "1234567890": + numToDelete = numToDelete + character + elif character == " ": + break + numToDelete = int(numToDelete) + async for oldMessage in Client.logs_from(ctx.message.channel, limit = numToDelete): + if counter < numToDelete: + await Client.delete_message(oldMessage) + counter = counter + 1 + await syncio.sleep(1.2) + elif "!DELETE" in message.content.upper(): + tmp = await message.channel.send("Clearing...") + async for msg in client.logs_from(message.channel): + await client.delete_message(msg) + +client.run("NjMyMTMzMDA4MTc4MDIwMzUz.XaBAUQ.ySHJRsIiLUswtta8kXqRbZddXQ4") diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee8561b --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Chatbot-Project +Git for our chatbot project + +Use this to keep track of what is going on with the project +https://trello.com/invite/b/l7ZJmmGQ/29309cc86adb1e44cde39de09adc31f9/chatbot-project + +There is a main file called "chatbot.py" which is the final bot. +Do not edit this unless you are adding code which has been tested and is working. + +Everyone has a "test" file called by their name e.g. I have Nik.py which is where I'll do my editting and testing. Once im happy I +would copy the code across to the the main "chatbot.py" file. \ No newline at end of file diff --git a/Vic.py b/Vic.py new file mode 100644 index 0000000..e8aea8c --- /dev/null +++ b/Vic.py @@ -0,0 +1,14 @@ +import discord + +client = discord.Client() + +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if message.content == "!Hi": + await message.channel.send("Hello") + +client.run("NjMyMTMzMDA4MTc4MDIwMzUz.XaBAUQ.ySHJRsIiLUswtta8kXqRbZddXQ4") diff --git a/python 3.6.4/chatbot.py b/python 3.6.4/chatbot.py new file mode 100644 index 0000000..d5b5b68 --- /dev/null +++ b/python 3.6.4/chatbot.py @@ -0,0 +1,19 @@ +import discord +from discord.ext.command import Bot +from discord.ext import commands +import asyncio +import time + +Client = discord.Client() +client = command.Bot(command_prefix = "!") + +@client.event +async def on_ready(): + print("We have logged in") + +@client.event +async def on_message(message): + if message.content == "cookie": + await client.send_message(message.channel, ":cookie:") + +client.run("2QZgvTyxIq8WyjgPRZMHhZJgiLd3A93T")