mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
insulting people is fun
This commit is contained in:
parent
69f2ab1895
commit
7d6214a88a
2 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import random
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
from typing import Optional, Tuple
|
||||
import discord
|
||||
|
@ -93,6 +94,7 @@ class Events(commands.Cog):
|
|||
await message.delete(delay=1)
|
||||
|
||||
else:
|
||||
# Respond to shronk bot
|
||||
if message.author.id == 1063875884274163732 and message.channel.can_send():
|
||||
RESPONSES = {
|
||||
"Congratulations!!": "Shut up SHRoNK Bot, nobody loves you.",
|
||||
|
@ -103,10 +105,12 @@ class Events(commands.Cog):
|
|||
if k in message.content:
|
||||
await message.reply(v, delete_after=10)
|
||||
break
|
||||
# Stop responding to any bots
|
||||
if message.author.bot is True:
|
||||
return
|
||||
# Only respond if the message has content...
|
||||
if message.content:
|
||||
if message.channel.can_send():
|
||||
if message.channel.can_send(): # ... and we can send messages
|
||||
if "linux" in message.content.lower() and self.bot.user in message.mentions:
|
||||
console.log(f"Responding to {message.author} with linux copypasta")
|
||||
try:
|
||||
|
@ -120,6 +124,15 @@ class Events(commands.Cog):
|
|||
if "carat" in message.content.lower():
|
||||
file = discord.File(Path(__file__).parent.parent / "carat.jpg")
|
||||
await message.reply(file=file)
|
||||
if message.reference is not None and message.reference.cached_message is not None:
|
||||
if message.content.lower().strip() in ("what", "what?"):
|
||||
text = "{0.author.mention} said %r, you deaf sod.".format(
|
||||
message.reference.cached_message
|
||||
)
|
||||
_content = textwrap.shorten(
|
||||
text % message.reference.cached_message.content, width=2000, placeholder="[...]"
|
||||
)
|
||||
await message.reply(_content)
|
||||
if message.channel.permissions_for(message.guild.me).add_reactions:
|
||||
if "mpreg" in message.content.lower() or "\U0001fac3" in message.content.lower():
|
||||
try:
|
||||
|
|
|
@ -56,8 +56,8 @@ class Bot(commands.Bot):
|
|||
await super().on_error(event, *args, **kwargs)
|
||||
|
||||
async def close(self) -> None:
|
||||
if getattr(self, "web", None) is not None:
|
||||
await self.http.close()
|
||||
if getattr(self, "web", None) is not None:
|
||||
self.console.log("Closing web server...")
|
||||
await self.web["server"].shutdown()
|
||||
self.web["task"].cancel()
|
||||
|
|
Loading…
Reference in a new issue