Search code examples
serverluaraspberry-pidiscordhost

What raspberry pi should I get to host a Discord Bot?


As you can see by the question, Im new to the Raspberry Pi and im looking to get one ideal to host a Discord bot from my home network at the lowest cst possible.

Before i look into what model i should be buying, I first of all need to know, Can you run a Luvit environment on a Raspberry Pi? I need to know this because it is needed for the Discordia lib that i have made my bot in

Any help would be appreciated, Thanks!


Solution

  • It very much depends on what your bot is. If your bot is not used very frequently and is not on too many guilds, then practically anything can run it. With discord.py, I ran 7 bots on the same server (2 cores, 2 GB RAM) and I could have done much more. If your bot has music functionality, the usage can go up dramatically. With just messages and basic commands interacting with just the Discord API, you should be fine on anything.

    So:

    Music commands

    Less than 500 guilds

    You can run on any of the raspberry pis as long as your code is optimised.

    More than 500 guilds

    This can vary a lot on activity. If you are on 1000s of guilds but there is never more than one guild using the music command at a time, then you should still be fine with any of them. To be safe and to allow for growth, I would recommend going for a Pi 3 B+.

    Just Discord API interaction

    Not using slow endpoints, for example, getting a large list of messages in a channel

    Less than 5000 guilds

    You should be able to run on any of the Pis

    More than 5000 guilds

    If you have a large number of active users, then you should go for a 3 B+ to be safe. If your bot is unstable and crashes, load up times on this amount of guilds is extremely slow. One of my bots has 1,000,000+ users and has a load up time of a couple of minutes with a large number of commands. The main variable on initial loading time is users.

    Having a loop that searches through 1,000,000s of messages or a command that does an action with a large amount of users

    You're going to need to be able to run well while running slow commands, so go for the 3 B+. If your bot has cooldowns for these kinds of commands, then you can probably run on a 2.