#๐ Does anyone have some youtube toturials or just an example I can use to make commands for my disco
46 messages ยท Page 1 of 1 (latest)
@noble breach
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.
How do u define ur bot also do u want prefix or / command
i dont really know the diffrence sorry I just started im just trying to make a simple bot like !ping and it responds pong
Aka prefix command
yes
don't watch tutorials on making discord bot
Bot=discord.bot(intents=discord.intents.all(),command_prefix="!")
theyre often bad with bad approach, bad habit, bad advice
that's not python naming convention, nor any language i know
@bot.command()
def ping(ctx):
ctx.send_message("pong")
said bot is not defined
i started yesterday
almost every api wrapper library require you to have some level of python knowledge
like the most used library discord.py will require this:
- Primitive data types
- Operators
- Data structures
- Importing
- Variables, namespace and scope
- String formatting
- Object-Oriented Programming (OOP)
- Control flow
- Exception handling
- Function definitions
- Classes, objects, attributes and methods
- Console usage, interpreters and environments
- Decorators
Useful to know:
- Asyncio basics
- What is blocking?
- Logging
- How to read docs properly
well ima try my best
its saying bot is not defined do you have aany idea how to define it?
because their naming is wrong 
Most of this only the usage not makeing is required annotations are needed and i think we dont require classes
I did say it earlier but i bet thanhZ know it better so follow him
you need to know what are these doing when you code, you don't code just to run it
I do but simple bot can be made only with functions and has more function ooriented characteristics than most languages
U need to know a bit of it but only from the outside like u dont need to know self for it witch i see to be confusing for many
discord.py uses OOP, it's base on classes, you don't only call function when using discord.py, bot = commands.Bot(...) is already OOP
you dont create a bot using only functions, you don't do bot = create_a_bot(...)
I didn't say oop is not required i said classes i mean self defined classes are not needed
True
True
But u could reach ur first goal earlyer makeing it feel better to code
i can just give them the link to example code but they will not learn anything and will just blindly copy paste, they need to be able to read the example code to make their own
Also for discord.py cmd is again not neede
That's what I asked for an example to bais off the other thing i want
i suggest you start by making terminal app first then discord bot can be later tho
https://docs.python.org/3/tutorial/ (official tutorial)
http://python.swaroopch.com/ (useful book)
https://automatetheboringstuff.com/ (for complete beginners to programming)
http://greenteapress.com/wp/think-python-2e/ (another decent book)
See also:
http://www.codeabbey.com/ (exercises for beginners)
https://realpython.com/ (good articles on specific topics)
https://learnxinyminutes.com/docs/python3/ (cheatsheet)
Dc bot is not that hard but its recommended to start from basics
it will be hard if it's your first time coding
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.
