Skip to content

Instantly share code, notes, and snippets.

View Jeydin21's full-sized avatar
🙃
Salutations!

Jeydin21 Jeydin21

🙃
Salutations!
View GitHub Profile
@Jeydin21
Jeydin21 / bot.js
Last active April 17, 2024 03:56
Code for a Discord bot that sends a message at an interval in a channel in a server
const Discord = require('discord.js'); // This code is for discord.js v12 because idk how to use v14
const client = new Discord.Client();
require('dotenv').config();
client.on('ready', () => {
console.log("Logged in as: " + client.user.tag);
const serverId = ''; // Server ID of the server the channel is in
const channelId = ''; // Channel ID of the channel you want the bot to send messages to
const message = ''; // Message you want the bot to send