asking another question. This time more complicated (for me at least). So i'm making a discord bot and when I do for example k!ship, it will print "a" (this is there for debugging) but wont show the embed. When I remove the keyword detector for the words "madoka" and "magical girl", evrey thing is fine. I assume this code bit is the problem. Here is the full code. (But not the token ofc) Also the couple_list has the names removed, there friends names so it makes sense.
# Imports
import discord
from discord.ext import commands
import random
# Credentials
TOKEN = 'use your imagination and imagine a token here :)'
# Create bot
client = commands.Bot(command_prefix='k!')
# Startup Information
@client.event
async def on_message(message):
if "madoka" in message.content:
await message.channel.send("✨being meguca is suffering✨")
@client.event
async def on_message(message):
if "magical girl" in message.content:
await message.channel.send("✨being meguca is suffering✨")
# Commands
@client.command()
async def jupiter(ctx):
await ctx.send('Peanut Butter')
# lists for commands
couple_list = ['imagination™']
ship_list = ['Madoka Kaname', 'Homura Akemi', 'Sayaka Miki', 'Mami Tomoe', 'Kyo(u)ko Sakura', 'Hitomi Shizuki',
'Kyosuke Kamijio']
ship_dis = ['It would be so intense!', 'A nail biter!', 'Its the best pick I got!']
# couple command
@client.command()
async def couple(ctx):
embed = discord.Embed(title=('In my opinion, ' + (random.choice(couple_list)) + ' and ' + (
random.choice(couple_list)) + ' would be a great pair!'), color=0x8b0000)
embed.set_footer(text="What a nice couple ❤♥♥")
await ctx.send(embed=embed)
# ship command
@client.command()
async def ship(ctx):
ship_cmd = discord.Embed(title=('In my opinion, ' + (random.choice(ship_list)) + ' and ' + (
random.choice(ship_list)) + ' would be a great ship!'), color=0x8b0000)
ship_cmd.set_footer(text=(random.choice(ship_dis)))
ship_cmd.set_thumbnail(
url="https://cdn.discordapp.com/attachments/801105512933752882/845050099678576640/unknown.png")
await ctx.send(embed=ship_cmd)
print("a")
# status
@client.event
async def on_ready():
await client.change_presence(
activity=discord.Activity(type=discord.ActivityType.watching, name='TOO MANY NAGITO EDITS!!'))
client.run(TOKEN)
Any help solving this would be great! -Jake