Answer the question
In order to leave comments, you need to log in
How to make a "variable" whose value will be the command argument?
I am writing a bot on Pydroid.
The code:
import discord
from discord.ext import commands
import asyncio
Bot = commands.Bot(command_prefix='!') #префикс
token = '?'# токен
@Bot.command()
async def test(ctx):
argument = ??? #аргумент_команды
Answer the question
In order to leave comments, you need to log in
You can split the string through split and assign it through the index
text = "Один два три четыре"
result = text.split(" ")
print(result[1])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question