Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require('dotenv').config();
- const Discord = require('discord.js');
- const { Client, IntentsBitField, EmbedBuilder } = Discord;
- const PoopyClient = new Client({
- fetchAllMembers: true,
- disableEveryone: false,
- intents: [
- IntentsBitField.Flags.Guilds,
- IntentsBitField.Flags.GuildMembers,
- IntentsBitField.Flags.GuildMessages,
- IntentsBitField.Flags.MessageContent,
- ],
- });
- PoopyClient.on('ready', async (member) => { // this event gets sented/alerted when the bot are online and is activated
- console.log(`✅ ${PoopyClient.user.tag} Are Now Online And Its Currenly Being Crazy LMFAO`)
- const CreateEmbed = new EmbedBuilder()
- .setColor('Random')
- .setTitle('Testing')
- .setDescription(`Lmfao`)
- .setTimestamp()
- const Activities_Lists = [
- "MrAndi Is Deving Roblox Game Lmfao",
- "MrAndi Is Currenly Busy With Irl Diabetes Stuff Lmfao",
- "This Poopy Bot Is Still Being Development Lmfao",
- `Channels: ${member.channels.cache.size}`, // Enables the bot to show how many channels it's in, in the status
- ]; // Creates an arraylist containing phrases you want your bot to switch through.
- PoopyClient.channels.cache.get(process.env.DEBUGCHANNELID).send({ embeds: [CreateEmbed] });
- setInterval(() => {
- const ActivitiesIndex = Math.floor(Math.random() * (Activities_Lists.length - 1) + 1); // generates a random number between 1 and the length of the activities array list (in this case 5).
- PoopyClient.user.setActivity(Activities_Lists[ActivitiesIndex]); // sets bot's activities to one of the phrases in the arraylist.
- }, process.env.SECONDS); // Runs this every 15 Or Random Amount Of Seconds.
- });
- PoopyClient.on('messageCreate', async (message) => { //This Event Gets sented/alerted when the bot is sented a message using a command
- const OwnerID = "808718935553736714"
- const Mention = "<@1178833408063971478>"
- const MentionDeveloper = "<@808718935553736714>"
- const ErrorMessage = "One of the emojis failed to react:"
- const Prefix = ">"
- if (message.content === Mention) {
- const CreateEmbed = new EmbedBuilder()
- .setTitle('Command Lists')
- .setColor('Random')
- .setDescription(`>ping, >toilet, >botinfo, >avatar`)
- .setTimestamp()
- return message.channel.send({ embeds: [CreateEmbed] });
- }
- if (message.content.toLowerCase().startsWith(Prefix + 'Ping', Prefix + 'Toilet', Prefix + 'Botinfo', Prefix + 'Avatar', Prefix + 'React'))
- if (message.content === Prefix + 'ping') {
- const CreateEmbed = new EmbedBuilder()
- .setTitle('Ping')
- .setColor('Random')
- .setDescription(`Heres Your Pong ${PoopyClient.ws.ping}: ms`)
- .setTimestamp()
- return message.channel.send({ embeds: [CreateEmbed] });
- }
- if (message.content === Prefix + 'toilet') {
- const CreateEmbed = new EmbedBuilder()
- .setTitle('Your So Skibidi')
- .setColor('Random')
- .setDescription(`i've Just Want To Be Your Sigma`)
- .setTimestamp()
- return message.channel.send({ embeds: [CreateEmbed] });
- }
- if (message.content === Prefix + 'botinfo') {
- const CreateEmbed = new EmbedBuilder()
- .setTitle('If Theres A Bug')
- .setColor('Random')
- .setDescription(`Please Let The Bot Developer Know ${MentionDeveloper}`)
- .setTimestamp()
- return message.channel.send({ embeds: [CreateEmbed] });
- }
- if (message.content === Prefix + 'avatar') {
- const CreateEmbed = new EmbedBuilder()
- .setTitle('Coming Soon')
- .setColor('Random')
- .setDescription('👀')
- .setTimestamp()
- return message.channel.send({ embeds: [CreateEmbed] });
- }
- if (message.content === 'amongus') {
- const ReactEmoji = message.guild.emojis.cache.find(emoji => emoji.name === 'amongus');
- try {
- await message.react(ReactEmoji);
- } catch (error) {
- console.error(ErrorMessage, error);
- }
- }
- if (message.content === 'nerd') {
- const ReactionEmoji = message.guild.emojis.cache.find(emoji => emoji.name === 'Nerdcord_2');
- try {
- await message.react(ReactionEmoji);
- } catch (error) {
- console.error(ErrorMessage, error);
- }
- }
- switch (message.content.toLowerCase()) {
- case Prefix + 'restartbot': {
- if (message.author.id !== OwnerID)
- return;
- message.channel.send('Restarting...').then(m => {
- PoopyClient.destroy().then(() => {
- PoopyClient.login(process.env.BOTTOKEN);
- });
- });
- break;
- }
- }
- })
- PoopyClient.login(process.env.BOTTOKEN)
Advertisement
Advertisement