![]() You've got a few options for connecting to the Linux VMs.Reading bot discord Step 2: Join the Stream. The default (as I write) is Debian GNU/Linux 10 (buster) which is running Python 3.7, good enough for us! Once the VM is live we can start getting our code setup on it. In choosing our VM we need something running Python 3.5+, to support our Discord bot code. At the same time, we need to avoid having more than one process running, otherwise we could have multiple responses to a Discord signal, which will be confusing. Returns a Discord.Result and a ref Discord.OAuth2Token via callback. If the game was not launched from Discord and this method is called, Discord will focus itself and prompt the user for authorization. We want to avoid any timeouts that might emerge if a serverless solution takes time to spin up listeners. If your game was launched from Discord and you call this function, you will automatically receive the token. Para criar um bot, você precisa criar um aplicativo no Developer Portal. While I love me some serverless architecture, and it's usually much lower overhead, in this case we want to have a persistent instance so there's always a process ready to respond to a request, via the Discord API. O Discord Developer Portal é a plataforma oficial para criar e gerenciar bots do Discord. The smallest instance is going to be fine for this Hello, World example, so let's use an f1-micro instance, because it's free! To get that going I chose us-east1 as my region, Series N1, then Machine type f1-micro. In Google Cloud, make a new project, head to Compute, and create a new instance. We'll need a Virtual Machine (VM), part of Google Compute Engine. Now, on to Google Cloud! First make sure you have an account set up and are able to create new resources. I'm assuming here that you've set up your Discord developer account, made a New Application (with a clever name of course), got the bot token from the menu under Settings > Bot > Token (have to Copy or Reveal), and have that stored safely on a sticky note by your desk. What would it take to actually run a bot on someone else's (ie. But I don't want my bot to disappear just because my computer is off, so I need something better: a computer that can always stay on. Since bots are just code that interact with Discord's APIs, they have to have a computer to run on. And part of that fun was seeing all the cool bots people have made on Discord to liven things up: moderation, trivia, and games: many little, weird, random games. For a translated version in your selected language, as available, please see here. Say a bot developer needs to quickly reset their token in an emergency, there may not be time to head to the dev portal on Discord's website. Discord Developer Portal Developer Portal Discord Developer Terms of Service Effective date: OctoLast updated: SeptemFor a link to the previous terms, please see here. However do keep in mind this is a purely on-topic server. Chatting with far-flung friends, playing games, exploring, finding community as I am able, and generally learning about a platform I had not used all that much before the pandemic. Add the Developer Portal to the Desktop client DrD3stiny 3 years ago This would make it much easier to quickly make changes to applications. Here are some Discord servers that can help you out with everything Discord API: The Official Discord Developers server has plenty of help channels with knowledgeable people and Discord's developers to get you help with something you need, and get updates straight from the developers. Stuck at home these past–checks calendar–732 months, I've been spending a lot more time on Discord (an online voice, video and text communications service) than I ever thought I would.
0 Comments
Leave a Reply. |