You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 27, 2022. It is now read-only.
constPeachy=require('peachy.js');constclient=newPeachy.Client({// Disabling some events can eventually improve performance on bots on many servers in combination with intents// Event list: https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-eventsdisabledEvents: ['TYPING_START'],shardId: 0,// Should start at 0. Useful for large bots in multiple machinesshardCount: 1,// How many shards spawnautoReconnect: true,intents: ['GUILDS','GUILD_MESSAGES'],// You can limit the caching of certain items to decrease memory consumption.// Leaving some items at 0 or at a very low value may cause some properties not to be available without the 'fetch' method.caches: {guilds: Infinity,// May break the entire bot, not recommended to disable.channels: Infinity,// If disabled, you won't be able to see properties and permissions for a channel through the cache.roles: 2500,// If disabled, you won't be able to see member properties, permissions through the cache.users: 100,// If disabled, you won't be able to get some information from users through the cache.membersPerGuild: 1000,// If disabled, you won't be able to get some member information through the cache.emojis: 0// If disabled, you won't be able to search for emojis through the cache.}});client.login('Bot token');client.on('messageCreate',async(msg)=>{if(msg.content==='!ping')msg.channel.send(`Pong! ${client.ping}ms.`);if(msg.content==='!say'){awaitmsg.delete();msg.channel.send(msg.content.slice(4));}if(msg.content==='!servers')msg.channel.send(`I'm in ${client.guilds.cache.size} guilds!`);});client.once('ready',()=>console.log('Connected to Discord!'));