mirror of
https://github.com/jcreek/denBot.git
synced 2026-07-14 11:23:47 +00:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa1fada289 | |||
| eea9841481 | |||
| 5f875bc91d | |||
| dadc08d94c | |||
| 73906e1957 | |||
| 84a8f2c22c | |||
| c6333e7d06 | |||
| 36366499ed | |||
| 95e9003ce7 | |||
| 02dc03e5ef | |||
| d901ee4672 | |||
| 6865d021a3 | |||
| c8dbcd9120 | |||
| df6211d5e4 | |||
| 17a8f98ca3 | |||
| 8d7df9d4ec | |||
| 2e5c468c8f | |||
| 3d51cc1551 | |||
| be885bc286 | |||
| f127e09858 | |||
| 3191be31e1 | |||
| c48edec643 | |||
| c642d95335 | |||
| e08495bfc2 | |||
| 087fecf93a | |||
| c3fcc15f06 | |||
| 939a99b62d | |||
| 3aa3f7ac52 | |||
| 9459e2714c | |||
| 6a3cec4a0e | |||
| be7ba9e28d | |||
| c48c5f32a9 |
+3
-3
@@ -3,10 +3,10 @@
|
|||||||
"deletecommandstoggle": false,
|
"deletecommandstoggle": false,
|
||||||
"maxqueuesize": 4,
|
"maxqueuesize": 4,
|
||||||
"elasticsearch" : {
|
"elasticsearch" : {
|
||||||
"elasticsearch_address" : "http://jcreek.ddns.net:9200",
|
"elasticsearch_address" : "http://YOUR-ELASTICSEARCH-ADDRESS-GOES-HERE:9200",
|
||||||
"elasticsearch_index_pattern" : "[logs-denbot-]YYYY.MM.DD"
|
"elasticsearch_index_pattern" : "[logs-denbot-]YYYY.MM.DD"
|
||||||
},
|
},
|
||||||
"prefix": "!",
|
"prefix": "!",
|
||||||
"token-dev": "Nzc4MDI2MTE1NDkwOTA2MTYz.X7L_SA.bNzC1kQUpBSwEsjp_cDGwR62Soo",
|
"token-dev": "YOUR-DEV-TOKEN-GOES-HERE",
|
||||||
"token": "NzcwMDQyMDEzMjY5NDkxNzUy.X5Xzgg.kcr_51g95iUvEcYCfbQvG1Sx8ao"
|
"token": "YOUR-TOKEN-GOES-HERE"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -400,17 +400,17 @@ client.on('message', function (message) {
|
|||||||
|
|
||||||
// Remove a tagged user from the queue
|
// Remove a tagged user from the queue
|
||||||
if (command === 'ru' && args[0]) {
|
if (command === 'ru' && args[0]) {
|
||||||
const user = getUserFromMention(args[0]);
|
|
||||||
|
|
||||||
// Delete the message with the bot command
|
// Delete the message with the bot command
|
||||||
if (config.deletecommandstoggle) {
|
if (config.deletecommandstoggle) {
|
||||||
message.delete();
|
message.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`${message.author.username} used command ru in ${message.channel.name}`);
|
logger.info(`${message.author.username} used command ru ${user} in ${message.channel.name}`);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const user = getUserFromMention(args[0]);
|
||||||
|
|
||||||
if ((playerQueue.includes(user))) {
|
if ((playerQueue.includes(user))) {
|
||||||
|
|
||||||
// Search for the user
|
// Search for the user
|
||||||
for(var i = 0; i < playerQueue.length; i++){
|
for(var i = 0; i < playerQueue.length; i++){
|
||||||
if ((playerQueue[i].username === user.username)){
|
if ((playerQueue[i].username === user.username)){
|
||||||
@@ -435,6 +435,10 @@ client.on('message', function (message) {
|
|||||||
message.channel.send(`${user.username} is not in the queue.`);
|
message.channel.send(`${user.username} is not in the queue.`);
|
||||||
logger.info( `${message.author.username} attempted to remove ${user.username} from queue but they weren't in it.`);
|
logger.info( `${message.author.username} attempted to remove ${user.username} from queue but they weren't in it.`);
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.error(`Tried to remove user ${args[0]} from queue but got an error: ${error}`);
|
||||||
|
message.channel.send(`Failed to remove ${args[0]} from the queue.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command === 'dc') {
|
if (command === 'dc') {
|
||||||
|
|||||||
Reference in New Issue
Block a user