mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix message content
This commit is contained in:
parent
961b66b157
commit
524d3ef76a
2 changed files with 6 additions and 2 deletions
|
@ -101,7 +101,7 @@ class Events(commands.Cog):
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_message(self, message: discord.Message):
|
async def on_message(self, message: discord.Message):
|
||||||
if not message.guild:
|
if not message.guild:
|
||||||
return
|
return console.log("Ignoring, was not in a guild.")
|
||||||
if message.channel.name == "pinboard":
|
if message.channel.name == "pinboard":
|
||||||
if message.type == discord.MessageType.pins_add:
|
if message.type == discord.MessageType.pins_add:
|
||||||
await message.delete(delay=0.01)
|
await message.delete(delay=0.01)
|
||||||
|
@ -120,6 +120,7 @@ class Events(commands.Cog):
|
||||||
if message.content:
|
if message.content:
|
||||||
if message.channel.can_send():
|
if message.channel.can_send():
|
||||||
if "linux" in message.content.lower() and self.bot.user in message.mentions:
|
if "linux" in message.content.lower() and self.bot.user in message.mentions:
|
||||||
|
console.log("Responding with linux copypasta")
|
||||||
try:
|
try:
|
||||||
with open("./copypasta.txt", "r") as f:
|
with open("./copypasta.txt", "r") as f:
|
||||||
await message.reply(f.read())
|
await message.reply(f.read())
|
||||||
|
@ -145,7 +146,7 @@ class Events(commands.Cog):
|
||||||
G_EMOJI = "\U0001f3f3\U0000fe0f\U0000200d\U0001f308"
|
G_EMOJI = "\U0001f3f3\U0000fe0f\U0000200d\U0001f308"
|
||||||
N_EMOJI = "\U0001f922"
|
N_EMOJI = "\U0001f922"
|
||||||
C_EMOJI = "\U0000271d\U0000fe0f"
|
C_EMOJI = "\U0000271d\U0000fe0f"
|
||||||
if "trans" in message.content.lower() or T_EMOJI in message.content.lower():
|
if any((x in message.content.lower() for x in ("trans", T_EMOJI, "femboy"))):
|
||||||
try:
|
try:
|
||||||
await message.add_reaction(N_EMOJI)
|
await message.add_reaction(N_EMOJI)
|
||||||
except discord.HTTPException as e:
|
except discord.HTTPException as e:
|
||||||
|
@ -155,6 +156,8 @@ class Events(commands.Cog):
|
||||||
await message.add_reaction(C_EMOJI)
|
await message.add_reaction(C_EMOJI)
|
||||||
except discord.HTTPException as e:
|
except discord.HTTPException as e:
|
||||||
console.log("Failed to add gay reaction:", e)
|
console.log("Failed to add gay reaction:", e)
|
||||||
|
else:
|
||||||
|
console.log("No content.")
|
||||||
|
|
||||||
if self.bot.user in message.mentions:
|
if self.bot.user in message.mentions:
|
||||||
if message.content.startswith(self.bot.user.mention):
|
if message.content.startswith(self.bot.user.mention):
|
||||||
|
|
1
main.py
1
main.py
|
@ -7,6 +7,7 @@ from utils import registry, console
|
||||||
|
|
||||||
intents = discord.Intents.default()
|
intents = discord.Intents.default()
|
||||||
intents += discord.Intents.messages
|
intents += discord.Intents.messages
|
||||||
|
intents += discord.Intents.message_content
|
||||||
intents += discord.Intents.members
|
intents += discord.Intents.members
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue