I have this code for my discord bot:
@bot.command(brief="Za map napiš Rod a druh a vyskočí ti mapa výskytu!")
async def map(ctx, *args):
if not args:
await ctx.channel.send("Nenapsal jsi Rod/ Rod a druh! \nVysvětlivka:")
await ctx.channel.send(
"https://cdn.discordapp.com/attachments/661985293834125342/808308254081417227/acz_map_command.png"
)
else:
await ctx.channel.send('Mapa výskytu: *{}*'.format(
' '.join(args).capitalize()))
await ctx.channel.send(
'https://antmap.coc.tools/images/{}.png '.format(
'.'.join(args).capitalize()))
await ctx.channel.send('AntWiki: *{}*'.format(
' '.join(args).capitalize()))
await ctx.channel.send(
'https://antwiki.org/wiki/{}'.format(
'_'.join(args).capitalize()))
The problem is here:
await ctx.channel.send(
'https://antmap.coc.tools/images/{}.png '.format(
'.'.join(args).capitalize()))
Bot sends this after you use the command: https:/antmap.coc.tools/images/Argument1.Argument2.png
But now I need to change it, so it sends https:/antmap.coc.tools/images/Argument1/Argument1.Argument2.png
Should it look like this:
'https://antmap.coc.tools/images/{}/{}.png'
or like this:
'https://antmap.coc.tools/images/{}.png'.format(
'/','.'.join(args).capitalize()
or something like that?
I have searched the answer a bit, but I couldn't figure it out yet.