• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    Dockerfile
  • Created about 2 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Launch your very own Discord bot to welcome your users and share a meme.

Open in GitHub Codespaces

Javascript Discord Welcome MemeBot with GitHub Codespaces

image of robotocat

Customize and deploy your own welcome memebot for your Discord server!

This template repository has all the code you need, with a preconfigured Codespaces development environment, to send a welcome message along with a meme when a user joins your Discord server.

How to customize your bot

image of manufacturetocat

Step 1: Add a .env file

This template repository requires a .env file to pass variables to your application. The .env file is used to store data that you want to keep private or hidden like API keys or tokens from external services like Discord.

This template repository has a sample .env file, .env-sample, that you can rename to .env or copy and paste the variables in .env-sample into a new .env file.

Step 2: Add your favorite meme

In your .env file you will find a variable named MEME_URL where you can add a URL to your favorite meme.

Step 3: Add a personalized welcome message

In the src directory you will find another directory called events. Open the events directory and you will find the guildMemberAdd.js file. You'll notice that we left helpful comments on where you can update the code to your liking.

To add a welcome message, you can update the getWelcomeMessage function after the content: keyword.

code block of get welcome message function

Step 4 (optional): Customize even further

Maybe you want to use an API service to provide random memes or maybe you don't want to share a meme at all. No matter what route you choose, you should take this Discord bot and make it your own. πŸ˜ƒ

We recommend creating a new branch anytime you tinker so you don't have to worry about making mistakes on your main branch. Once your new branch is in a good state, you can merge your changes to your main branch using a pull request. πŸš€

How to deploy your bot

image of jetpacktocat

Step 1: Create a new application on Discord

Visit https://discord.com/developers/applications to create a new application on Discord. Once there, click the new application button. After you click on the new application button, you can then create a new application (Note: That we created a new application called Bot Developer):

Screenshot 2022-10-07 at 1 01 38 PM

Step 2: Open your application

After creating an application you should see the application under My applications. Open your newly created application by clicking on it.

Screenshot 2022-10-07 at 1 02 12 PM

Step 3: Configure your bot user

Select the Bot settings to edit the details. First, click on reset token to generate a new token that you will use in your .env file. Copy the generated token and set the TOKEN variable in your .env file with your newly generated token.

Select the public bot option if you want your bot to be publically available. Select all the Privileged Gateway Intents like PRESENCE INTENT, SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT if your bot needs those intents.(Note: For this application you'll need all of these intents.)

image

Step 4: Select your bot permissions

Open the OAuth2 setting and then select URL Generator.

Select the bot checkbox under SCOPES. After, select Send Messages, Mention Everyone, and Add Reactions.

Once you have set your bot permissions copy the generated url below.

image

Step 5: Choose your Discord Server

Visit the generated url from the previous step and choose the server that you want to add the bot to. Once you've selected the server click continue.

image

Step 6: Run your application

Once the bot is added it will appear on your Discord server in offline mode.

You can now run the code in the repository using the command line by typing the command npm start.

More Repositories

1

GitHubGraduation-2022

Join the GitHub Graduation Yearbook and "walk the stage" on June 11.
1,446
star
2

GitHubGraduation-2021

Join the GitHub Graduation Yearbook and "walk the stage" on June 5.
JavaScript
1,375
star
3

classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
Ruby
1,339
star
4

graduation

$ git remote <graduation> yearbook
JavaScript
747
star
5

codespaces-project-template-js

Codespaces template for creating and deploying your own React portfolio
JavaScript
603
star
6

primer-explore-github

406
star
7

teachers_pet

Command line tool to help teachers use GitHub in their classrooms
Ruby
187
star
8

teachers

Join the discussion in the GitHub Education Community:
182
star
9

codespaces-project-template-py

Codespaces template for building a Python project
HTML
157
star
10

codespaces-project-template-dotnet

Codespaces template for building a .NET project
HTML
132
star
11

launchpad-profile-readme

128
star
12

classroom-assistant

Clone student repositories in bulk
JavaScript
116
star
13

Octernships

GitHub Octernships program connects students with industry partners in paid professional experiences and mentorship on open source and software development projects.
115
star
14

github-starter-course

93
star
15

github-university-2020

86
star
16

Student-Developer-Pack-Current-Partners-FAQ

This repo gives you an overview of the Student Developer Pack, the current partners in the pack and answers to frequently asked questions about the pack.
84
star
17

codespaces-teaching-template-py

Codespaces template for teaching Python
Jupyter Notebook
83
star
18

autograding

GitHub Education Auto-grading and Feedback for GitHub Classroom
TypeScript
59
star
19

autograding-example-python

GitHub Classroom autograding example repo with Python and Pytest
Python
45
star
20

PR-TalentLandMX

Participa para ganar swag especial dentro de Talend Land 2023
42
star
21

PR-Pao-de-Queijo-Request

HTML
41
star
22

codespaces-teaching-js-template

Codespaces template for teaching JavaScript
JavaScript
38
star
23

guide

GitHub guide for teachers
Ruby
34
star
24

autograding-example-java

GitHub Classroom autograding example repo with Java, Gradle, and JUnit
Java
26
star
25

PR-Patches-Campus-Party

PR-Patches-Campus-Party
HTML
24
star
26

Classroom-Report-2020

Design, analysis, findings and raw data from the 2020 GitHub Education Classroom Report
20
star
27

Classroom-Report-2018

Design, analysis, findings and raw data from the 2018 GitHub Education Classroom Report
20
star
28

primer-copilot

17
star
29

hackconviii

The conference for hacker community leaders: https://hackcon.mlh.io/. Here you can find everything related to the GitHub Scavenger Hunt.
16
star
30

codespaces-teaching-template-dotnet

Codespaces template for teaching .NET
HTML
14
star
31

Series-Intro-to-GitHub-Flow

12
star
32

autograding-example-c

GitHub Classroom autograding example repo with C and bash tests
Shell
12
star
33

autograding-example-cpp

GitHub Classroom autograding example repo with C++ and Catch.
C++
12
star
34

autograding-grading-reporter

Renders Autograding output and syncs results to classroom
JavaScript
11
star
35

autograding-example-node

GitHub Classroom autograding example repo with Node and Jest.
JavaScript
10
star
36

Classroom-Report-2019

Design, analysis, findings and raw data from the 2019 GitHub Education Classroom Report
10
star
37

Global-Campus-Experiences

This is a guide to Global Campus Experiences and how learners can approach incorporating them into your learning journey.
7
star
38

edu-resource-guide

Resources for GitHub and GitHub Education products and services.
5
star
39

autograding-command-grader

JavaScript
3
star
40

autograding-io-grader

JavaScript
2
star
41

example-classroom-template

Ruby
1
star