#๐ ```How do I create a text command? Example. .command and he replies with my predefinite text
37 messages ยท Page 1 of 1 (latest)
@uneven meadow
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
THe question is not clear. Can you show your code?
I don't have a code but I mean:
!command
and the bot responds:
A text chosen by me
You want to build a bot?
ye
discord
but for now I only need this command
Do you know any Python?
Building a bot has a lot of steps involved, it's not an easy first project.
I'm doing it on bot hosting with python 3.9
I just need this command, nothing else
I recommend going through a tutorial and learn how discord bots work. See and follow this well written tutorial: https://fallendeity.github.io/discord.py-masterclass/
A hands-on guide to Discord.py
I know how to create bots
.
But you don't have code?
How did you make your discord bot command without code?
I bought this source, but I want to add the command with my text
Oh you bought the source code. Do you know where the discord bot logic is at?
Do you know Python?
do you mean the version?
Creating a command involves writing Python code. We're trying to figure out if you know how to write Python code.
@raftar.command()
async def help(ctx):
help_text = '''
help text
'''
await ctx.send(help_text)
logger.info("Help Command Used")
@raftar.command()
it should be like this @deft saffron @oblique apex
I don't know "raftar", is that what you bought?
ye
Then I doubt any of us could help with it, since we don't know it. You should ask the people you bought it from.
If it's like discord.py, maybe this documentation will help: https://discordpy.readthedocs.io/en/stable/
I can show you the format of the commands
that might help, but we'd be guessing, since we don't know the API you bought.
But, show us the file
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.