mirror of
https://github.com/jcreek/denBot.git
synced 2026-07-14 03:13:46 +00:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 421858938c | |||
| 10536a87f1 | |||
| 482af77249 | |||
| 67566a6fea | |||
| 628c063c15 | |||
| 6cef805649 | |||
| 4133eae25d | |||
| e752d3ce80 | |||
| 400b34b9e4 | |||
| 7bf9ae00ee | |||
| 4429e02b22 | |||
| 49cd612f51 | |||
| f6af7b4327 | |||
| 01768c5567 | |||
| 9700808773 | |||
| 857ee29e10 | |||
| d37b3f8225 | |||
| 6eb1bf5c8a | |||
| f32441716f | |||
| 2d113f8a8b | |||
| 4bc416ec56 | |||
| e47ff9596b | |||
| 1dc17b49b9 | |||
| 43778d360a | |||
| 4e2c79614b |
+3
-3
@@ -3,10 +3,10 @@
|
|||||||
"deletecommandstoggle": false,
|
"deletecommandstoggle": false,
|
||||||
"maxqueuesize": 4,
|
"maxqueuesize": 4,
|
||||||
"elasticsearch" : {
|
"elasticsearch" : {
|
||||||
"elasticsearch_address" : "http://YOUR-ELASTICSEARCH-ADDRESS-GOES-HERE:9200",
|
"elasticsearch_address" : "http://jcreek.ddns.net:9200",
|
||||||
"elasticsearch_index_pattern" : "[logs-denbot-]YYYY.MM.DD"
|
"elasticsearch_index_pattern" : "[logs-denbot-]YYYY.MM.DD"
|
||||||
},
|
},
|
||||||
"prefix": "!",
|
"prefix": "!",
|
||||||
"token-dev": "YOUR-DEV-TOKEN-GOES-HERE",
|
"token-dev": "Nzc4MDI2MTE1NDkwOTA2MTYz.X7L_SA.bNzC1kQUpBSwEsjp_cDGwR62Soo",
|
||||||
"token": "YOUR-TOKEN-GOES-HERE"
|
"token": "NzcwMDQyMDEzMjY5NDkxNzUy.X5Xzgg.kcr_51g95iUvEcYCfbQvG1Sx8ao"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 ${user} in ${message.channel.name}`);
|
logger.info(`${message.author.username} used command ru 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,10 +435,6 @@ 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