mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
useClusterClient
This commit is contained in:
parent
c3213c28d8
commit
b9e0d40cf3
1 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
||||||
const { Constants, ClusterClient, CommandClient, InteractionCommandClient } = require('detritus-client');
|
const { Constants, ClusterClient, CommandClient, InteractionCommandClient } = require('detritus-client');
|
||||||
|
const { ActivityTypes, PresenceStatuses } = require('detritus-client/lib/constants');
|
||||||
|
|
||||||
const Paginator = require('./paginator').PaginatorCluster
|
const Paginator = require('./paginator').PaginatorCluster
|
||||||
|
|
||||||
// Create client
|
|
||||||
const cluster = new ClusterClient("", {
|
const cluster = new ClusterClient("", {
|
||||||
cache: {messages: {expire: 60 * 60 * 1000}},
|
cache: {messages: {expire: 60 * 60 * 1000}},
|
||||||
gateway: {
|
gateway: {
|
||||||
|
@ -11,9 +12,9 @@ const cluster = new ClusterClient("", {
|
||||||
presence: {
|
presence: {
|
||||||
activity: {
|
activity: {
|
||||||
name: 'v2',
|
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,
|
activateOnEdits: true,
|
||||||
mentionsEnabled: false,
|
mentionsEnabled: false,
|
||||||
prefix: commandPrefix,
|
prefix: commandPrefix,
|
||||||
|
useClusterClient: true,
|
||||||
ratelimits: [
|
ratelimits: [
|
||||||
{duration: 60000, limit: 50, type: 'guild'},
|
{duration: 60000, limit: 50, type: 'guild'},
|
||||||
{duration: 5000, limit: 5, type: 'channel'},
|
{duration: 5000, limit: 5, type: 'channel'},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const interactionClient = new InteractionCommandClient()
|
const interactionClient = new InteractionCommandClient(cluster, {
|
||||||
|
useClusterClient: true
|
||||||
|
})
|
||||||
|
|
||||||
const { maintower } = require('./logging');
|
const { maintower } = require('./logging');
|
||||||
const { icon } = require('./utils/markdown');
|
const { icon } = require('./utils/markdown');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue