Skip to content

Instantly share code, notes, and snippets.

View ember-ana's full-sized avatar
🌱

ember / mint ember-ana

🌱
View GitHub Profile
@ember-ana
ember-ana / index.js
Last active April 4, 2025 00:03
for anyone stumbling upon this from my profile: this was a code review for someone's first Discord bot as a complete beginner to JavaScript :)
const Discord = require("discord.js");
const TOKEN = "TOKEN";
const { Client, RichEmbed } = require('discord.js');
// Why do you require discord.js twice? the require call in line 1 is redundant
var bot = new Discord.Client();
// since you required Client explicitely, you could do new Client() instead of new Discord.Client();
// var is kinda deprecated, I suggest you use const, as the bot variable doesn't change in the future
@ember-ana
ember-ana / ftfy.js
Last active April 4, 2025 00:05
Context: I linked this in a Reddit comment, as an example of how little code is necessary to start automating moderation yourself
const { Client } = require('discord.js');
const token = 'YOUR_FANCY_DISCORD_TOKEN';
client = new Client();
const spamBotUrls = [
'privatepage.vip',
'nakedphotos.club'
];