I have been having trouble getting a specific part of the command. What I intend to do is that when L is in the x position I want it to send a message that is formatted one way and when L is in a different position I want it to send a different message.
The command I am working with here is: !en L BTC 19500 Nothing prints in the embed when I run the code
@bot.command()
async def en(ctx):
if (ctx.author.id == 573284477158162433 or 244240895627624448):
global channels, message
x = ctx.message.content
print(len(x))
if(x[4:len(x)-11]=="L"):
message = "**Type:Long **"+"**Ticker: **"+x[4:len(x)-6] + "\n **Entry Price:** " + x[7:]
print(message)
f=0
for i in range(len(channels)):
f+=1
current_server = channels[i]
disc_channel = bot.get_channel(current_server)
await ctx.send(content = "@everyone", allowed_mentions = allowed_mentions)
embed = discord.Embed(title="Entry", description=message, color=0x70f508)
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text="Viggy Analytics")
await disc_channel.send(embed=embed)