Compare commits
19
Commits
8d6e311ea5
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a387a6ebe | ||
|
|
0c95903282 | ||
|
|
8ccbfcc67c | ||
|
|
f1857631be | ||
|
|
1ebc211be9 | ||
|
|
abe3cd9fb4 | ||
|
|
5877807846 | ||
|
|
c0218f0ce9 | ||
|
|
c10fe069d3 | ||
|
|
d47c75b557 | ||
|
|
8c81b0f7f9 | ||
|
|
938a950d09 | ||
|
|
f7d6364e35 | ||
|
|
3bf14022ab | ||
|
|
eb34dbdd3a | ||
|
|
40b46382c7 | ||
|
|
e546a0e1ce | ||
|
|
2ab7899c50 | ||
|
|
5a4be0e027 |
@@ -1,6 +1,7 @@
|
|||||||
import random
|
import random
|
||||||
import os
|
import os
|
||||||
import secrets
|
import secrets
|
||||||
|
import io
|
||||||
|
|
||||||
import emoji
|
import emoji
|
||||||
import discord
|
import discord
|
||||||
@@ -28,9 +29,9 @@ def emojer():
|
|||||||
|
|
||||||
def fuit_response():
|
def fuit_response():
|
||||||
vid = secrets.choice(os.listdir("./assets/vid/"))
|
vid = secrets.choice(os.listdir("./assets/vid/"))
|
||||||
ourfile = discord.File(vid)
|
path = f"./assets/vid/{vid}"
|
||||||
return ourfile
|
#with open(path, "rb") as ourfile:
|
||||||
|
return path
|
||||||
|
|
||||||
async def doccy_response():
|
async def doccy_response():
|
||||||
doccy = jackblack()
|
doccy = jackblack()
|
||||||
@@ -39,12 +40,6 @@ async def doccy_response():
|
|||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
|
||||||
@bot.command(hidden=True)
|
|
||||||
@commands.is_owner()
|
|
||||||
async def testfruit(ctx):
|
|
||||||
fuit = fuit_response()
|
|
||||||
await ctx.send(fuit)
|
|
||||||
|
|
||||||
async def build_response():
|
async def build_response():
|
||||||
|
|
||||||
fuit = fuit_response()
|
fuit = fuit_response()
|
||||||
@@ -59,12 +54,6 @@ async def build_response():
|
|||||||
else:
|
else:
|
||||||
resps = doccy
|
resps = doccy
|
||||||
|
|
||||||
'''resps = [
|
|
||||||
doccy,
|
|
||||||
emoji_response,
|
|
||||||
|
|
||||||
]
|
|
||||||
'''
|
|
||||||
#return str(secrets.choice(resps))
|
#return str(secrets.choice(resps))
|
||||||
return resps
|
return resps
|
||||||
|
|
||||||
@@ -80,13 +69,16 @@ async def on_message(message):
|
|||||||
if bot.user.mentioned_in(message):
|
if bot.user.mentioned_in(message):
|
||||||
if random.randint(0, 10) == 5:
|
if random.randint(0, 10) == 5:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
response = await build_response()
|
response = await build_response()
|
||||||
|
|
||||||
|
try:
|
||||||
|
await message.channel.send(file=discord.File(response))
|
||||||
|
except:
|
||||||
if response.startswith("<https://"):
|
if response.startswith("<https://"):
|
||||||
pass
|
pass
|
||||||
if response.isupper():
|
if response.isupper():
|
||||||
pass
|
pass
|
||||||
else:
|
|
||||||
response = response.capitalize()
|
|
||||||
if response.startswith("<"):
|
if response.startswith("<"):
|
||||||
await message.channel.send(f"{response}")
|
await message.channel.send(f"{response}")
|
||||||
elif response.startswith(":"):
|
elif response.startswith(":"):
|
||||||
@@ -96,6 +88,14 @@ async def on_message(message):
|
|||||||
else:
|
else:
|
||||||
await message.channel.send(f"{response}")
|
await message.channel.send(f"{response}")
|
||||||
|
|
||||||
bot.load_extension('jishaku')
|
await bot.process_commands(message)
|
||||||
bot.run(TOKEN)
|
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_ready():
|
||||||
|
await bot.load_extension('jishaku')
|
||||||
|
print(f"[*] I am {bot.user} (ID: {bot.user.id})")
|
||||||
|
game = discord.Game(name="https://traps.moe", activity=random.randint(0, 3))
|
||||||
|
await bot.change_presence(status=discord.Status.online, activity=game)
|
||||||
|
print("------")
|
||||||
|
|
||||||
|
bot.run(TOKEN)
|
||||||
Reference in new issue
Block a user