Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added files
- Loading branch information
TheSlothinatoor
authored and
TheSlothinatoor
committed
Oct 18, 2019
1 parent
eb65222
commit 1acaab8cea0bb1bbd092b71e79abd58555f5be05
Showing
8 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |