#How to start coding a bot on Linux?

1 messages · Page 1 of 1 (latest)

lavish vector
#

Hello, I want to start coding my discord bot. I've done it before on windows but I've recently switched to Linux and I'm not sure where to start or put the directory. I also assume I have to use Github, but not familiar with the commands yet. I use VSCodium, can anyone help?

charred burrow
#

Most (read: almost all) programming languages are the same regardless of the operating system, so whatever you did on Windows should still work on Linux

#

You don't have to use GitHub at all, that's just what people choose to store their code. You could store it on GitLab, Codeberg - even a OneDrive or Google Drive folder if that's what you want

lavish vector
#

okie dokie, I appreciate it bless

barren onyx
#

There might be a small difference in commands you run I.e py -> python3 or something like that

#

But it’s all very simple

#

A quick Google search would yield all the results you’d need as John Lightbulb stated, there differences are very minimal and syntax wouldn’t change

lavish vector
#

cool, that makes things much easier, thank you!

lavish vector
#

when i try to import hikari it says "unknown word" but lightbulb seems to be fine, any idea why?

#

both are installed so im not sure why that is

#

maybe i misspelled

#

it doesnt seem like i did..?

charred burrow
#

Does it say unknown word or unknown import

#

because of course it's not a word (in English)

lavish vector
#

unknown word

charred burrow
#

it's just your dictionary trying to fix spelling then. ignore it

lavish vector
#

is it just spell check being funky

#

gotcha

#

ty

lavish vector
#

Hello, so, I've got the bot up and running now and I want the bot to reply when certain strings are sent in my server (for instance, if someone says "Hi {bot name}!", I want to reply with something in response), what event do I need for that function?

#

do these messages have to start with the string or is there are a way to have the bot reply to a message with a specified string in it or phrase?

keen widget
#

MessageCreateEvent

#

You have to write all the logic for which messages you want to reply to yourself

lavish vector
#

Thank you

barren onyx
# lavish vector Thank you

In addition, should you need the message content you’ll need to enable the privileged intent Message Content

#

Otherwise you’ll only get content of messages the bot is mentioned in (I think)

#

And privileged intents need to be specifically asked for if you want to verify your bot should you reach a hundred servers, but otherwise it’s fine to use

lavish vector
#

passion project to help me learn some coding stuff

barren onyx
#

For message content

#

Should be fine

charred burrow
#

^^ to clarify - if you need to access message content, you need to enable the intent on the dashboard (and IIRC you have to specify it using the intents= parameter on the bot). otherwise, anytime you try to access message content, it will be None.
you only have to verify your usage if your bot goes over 75 servers, but as you say you'll never need to do that

lavish vector
#

i appreciate all the help guys jpegdog