slash

Pycord dynamically slash-command option choices from DB

Pycord dynamically slash-command option choices from DB Question: I try use dynamically slash command from database value i’m using sqlite3 and my database name is server id so for connection to database i have to use ctx.guild.id and now i can’t use this command outside method in Cogs but i have to use that command …

Total answers: 2

Multi word discord slash commands (PyCord)

Multi word discord slash commands (PyCord) Question: I’m making a simple set of slash commands using pycord for discord. import discord bot = discord.Bot() testingServer = [{server ID}] @bot.slash_command(guild_ids = testingServer, name ="verify_help", description="blabla" ) async def verifyHelp(ctx): embed=discord.Embed(title="Verify Your Wallet", description = "help goes here",color=0xffffff) await ctx.respond(embed = embed, ephemeral=True) bot.run({TOKEN}) I believe it’s …

Total answers: 1

Python Replace \ with

Python Replace \ with Question: So I can’t seem to figure this out… I have a string say, “a\nb” and I want this to become “anb”. I’ve tried all the following and none seem to work; >>> a ‘a\nb’ >>> a.replace(“\”,””) File “<stdin>”, line 1 a.replace(“\”,””) ^ SyntaxError: EOL while scanning string literal >>> a.replace(“\”,r””) …

Total answers: 9