25 Commits

Author SHA1 Message Date
jcreek 421858938c feat(*): Replace some key messages with embed messages 2020-12-13 21:23:57 +00:00
jcreek 10536a87f1 feat(*): Add helpers file with sendEmbedMessage function 2020-12-13 21:23:40 +00:00
jcreek 482af77249 fix(*): Clear pokemon name and captain name when using the clear queue command 2020-11-29 18:34:49 +00:00
jcreek 67566a6fea fix(*): Clear pokemon name and captain ign when filling a queue 2020-11-29 18:25:36 +00:00
jcreek 628c063c15 feat(*): Disable the automatic channel deletion 2020-11-22 10:29:08 +00:00
jcreek 6cef805649 feat(*): Add manual update instructions to readme 2020-11-21 15:08:57 +00:00
jcreek 4133eae25d feat(*): Add future feature suggestions section to readme 2020-11-21 15:08:23 +00:00
jcreek e752d3ce80 fix(*): Enable users with spaces in their username to delete their adventure channels
Why on earth does Discord even allow people to have spaces in their usernames?
2020-11-21 14:38:50 +00:00
jcreek 400b34b9e4 fix(*): Hand edge cases for the start command 2020-11-21 14:26:11 +00:00
jcreek 7bf9ae00ee fix(*): Use prefix rather than command text for help and adminhelp commands 2020-11-20 00:00:59 +00:00
jcreek 4429e02b22 fix(*): Missed empty queue check for when a player leaves a queue they were the only one in 2020-11-19 23:36:13 +00:00
jcreek 49cd612f51 feat(*): Finish implementing start command 2020-11-19 23:24:59 +00:00
jcreek f6af7b4327 fix(*): Fix further missed lowercasing of channel names by Discord for text channels 2020-11-19 23:17:48 +00:00
Josh Creek 01768c5567 feat(*): Remove potential feature from readme as it has been implemented 2020-11-19 22:55:58 +00:00
Josh Creek 9700808773 feat(*): Add start command for voting to start the adventure before the queue is full 2020-11-19 22:53:45 +00:00
Josh Creek 857ee29e10 feat(*): Update help commands to use the correct command symbol from the config file rather than hard-coding one 2020-11-19 22:49:41 +00:00
jcreek d37b3f8225 fix(*): Fix bug where text channel names are automatically lowercased by Discord so couldn't be deleted if the username had capital letters 2020-11-18 19:15:57 +00:00
jcreek 6eb1bf5c8a fix(*): Fix broken channel deletion and add more helpful logs 2020-11-16 23:04:21 +00:00
jcreek f32441716f feat(*): Add a dev token for debugging and testing in the dev discord 2020-11-16 23:03:58 +00:00
jcreek 2d113f8a8b feat(*): Enable console logging even in production so Jord can see logs easily 2020-11-05 23:36:32 +00:00
jcreek 4bc416ec56 feat(*): Improve logging and error handling 2020-11-05 23:35:55 +00:00
jcreek e47ff9596b feat(*): Remove unused getCurrentDateAndTime function 2020-11-05 23:23:37 +00:00
jcreek 1dc17b49b9 fix(*): Further fixes to elasticsearch logging to get the stacktrace coming through correctly 2020-11-05 23:21:19 +00:00
jcreek 43778d360a fix(*): Make the elasticsearch logging render out log data correctly for filtering in kibana 2020-11-05 22:52:31 +00:00
jcreek 4e2c79614b feat(*): Implement winston-elasticsearch for logging to Elasticsearch 2020-11-05 16:55:16 +00:00
2 changed files with 29 additions and 33 deletions
+3 -3
View File
@@ -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"
} }
+4 -8
View File
@@ -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') {