https://github.com/thekicker/discord-bot-alpha
Using a tutorial from FreeCodeCamp as a base, created a simple Discord Bot just for fun.
https://github.com/thekicker/discord-bot-alpha
apod-api cloud discord-api discord-bot discord-py hobby nasa
Last synced: 7 days ago
JSON representation
Using a tutorial from FreeCodeCamp as a base, created a simple Discord Bot just for fun.
- Host: GitHub
- URL: https://github.com/thekicker/discord-bot-alpha
- Owner: TheKicker
- Created: 2020-12-22T15:24:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-15T13:56:40.000Z (over 5 years ago)
- Last Synced: 2025-10-20T04:53:12.127Z (9 months ago)
- Topics: apod-api, cloud, discord-api, discord-bot, discord-py, hobby, nasa
- Language: Python
- Homepage: https://Alpha-Bot.thekicker.repl.co
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discord Bot
Following this tutorial from freeCodeCamp - Link
This tutorial will show you how to build your own Discord bot completely in the cloud. You do not need to install anything on your computer, and you do not need to pay anything to host your bot. We are going to use a number of tools, including the Discord API, Python libraries, and a cloud computing platform called Repl.it. There is also a video version of this written tutorial. The video is embedded below and the written version is after the video.
## Required Tools (How to Install)
Make an env file with your bot-token and utilities. Use the EXAMPLE file as a guide.
```
// .env file
TOKEN = "your-token-goes-here-1A2B3C4D5E6FG7H8"
GAME = "Chess"
TVSHOW = "Friends"
MUSIC = "Kanye West"
NASA = "your-specific-nasa-api-key-here-1A2B3C4D5E6FG7H8"
apodCHAN = "your-APOD-channel-in-your-Discord-123456789"
```
Discord API Dependency
```
pip install discord
```
US Holidays Dependency
```
pip install holidays
```
Schedule Dependency
```
pip install schedule
```
## Bug Fixes
To use custom emojis within your discord bots responses (LINK):
```
Bot's can't use emoji's direcly, they need to use an emoji-ID.
So, in your server type \:vibin: and it will give you something like this: <:vibin:737290870583197757>
Copy that whole thing (with the < and >) and paste that in the response text that the bot should say. Each custom emoji-ID looks like this <:emojiname:numbers> and when you send a emoji then your app will auto convert it to the ID, this does not happens with bots so for bots you need to set it manualy
```
Bots pretty much ignore bots to prevent endless loops of death (LINK):
```
Erisbot is likely ignoring the message by checking if it's sent from a bot. Bot to bot interactions should be avoided because it can cause loops of bots just replying to each other.
just going to have to code your own features :)
```
To set custom status messages for your bot - use client.change_presence (LINK):
```
// Main.py (Line 15)
// Gaming
await client.change_presence(activity=discord.Game('Rainbow 6 Siege'))
// Streaming
await client.change_presence(activity=discord.Streaming(name='Roblox', url='https://www.twitch.tv/your_channel'))
// Watching
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name='The Office'))
// Listening
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name='Kids See Ghosts'))
```