Discord.js get a bot to download a posted file
Now lets assume url is this meme. Besides the link I posted in the comments section, from looking at the Discord documentation , it appears the url is in the attachment object. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 3 years, 3 months ago.
Active 3 years, 3 months ago. Viewed 8k times. Teodoro Villanueva Teodoro Villanueva 47 1 1 silver badge 6 6 bronze badges. Guess you didn't look too far With all the necessities installed, you're almost ready to start coding your bot. While you are coding, it's possible to run into numerous syntax errors or code in an inconsistent style. You should install a linter to ease these troubles.
While code editors generally can point out syntax errors, linters coerce your code into a specific style as defined by the configuration. While this is not required, it is advised. Installing Node.
Dirks T. Dirks 3, 1 1 gold badge 15 15 silver badges 29 29 bronze badges. This code must help you, import shutil from discord. Finally, add this bot to your channel and give it a bot role. Sivaramakrishnan Sivaramakrishnan 2 2 silver badges 15 15 bronze badges. I know how to make bot, im making this bot in discord. Javascript, not python — Stasio. Okay sorry but i still need some help :D — Stasio.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
The Intents. Open your terminal and run node index. If you see "Ready! You can open your package. You can then run node. Pressing up and then enter after closing the process is a quick way to start it up again.
If you want to compare your code to the code we've constructed so far, you can review it over on the GitHub repository here open in new window. Initial files Once you add your bot to a server , the next step is to start coding and get it online! Creating configuration files As explained in the "What is a token, anyway? Using config. Command line Usage.
0コメント