useClusterClient

This commit is contained in:
derpystuff 2022-07-04 23:25:53 +02:00
parent c3213c28d8
commit b9e0d40cf3

View file

@ -1,7 +1,8 @@
const { Constants, ClusterClient, CommandClient, InteractionCommandClient } = require('detritus-client');
const { ActivityTypes, PresenceStatuses } = require('detritus-client/lib/constants');
const Paginator = require('./paginator').PaginatorCluster
// Create client
const cluster = new ClusterClient("", {
cache: {messages: {expire: 60 * 60 * 1000}},
gateway: {
@ -11,9 +12,9 @@ const cluster = new ClusterClient("", {
presence: {
activity: {
name: 'v2',
type: Constants.ActivityTypes.WATCHING,
type: ActivityTypes.WATCHING,
},
status: Constants.PresenceStatuses.ONLINE,
status: PresenceStatuses.ONLINE,
},
}
});
@ -34,13 +35,16 @@ const commandClient = new CommandClient(cluster, {
activateOnEdits: true,
mentionsEnabled: false,
prefix: commandPrefix,
useClusterClient: true,
ratelimits: [
{duration: 60000, limit: 50, type: 'guild'},
{duration: 5000, limit: 5, type: 'channel'},
]
});
const interactionClient = new InteractionCommandClient()
const interactionClient = new InteractionCommandClient(cluster, {
useClusterClient: true
})
const { maintower } = require('./logging');
const { icon } = require('./utils/markdown');