Skip to content

Commit

Permalink
2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
chasyumen committed Jul 23, 2022
1 parent 9e3abf2 commit d4ad39a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bot/events/addLogQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
name: "addLogQueue",
event: "addLogQueue",
exec: function (subject, title, time, content) {
var content = `[${time.getFullYear()}/${time.getMonth()}/${time.getDate()} ${time.getHours()}:${time.getMinutes()}:${time.getSeconds()}]`+
var content = `[${time.getFullYear()}/${time.getMonth()+1}/${time.getDate()} ${time.getHours()}:${time.getMinutes()}:${time.getSeconds()}]`+
` [${subject}-${title}] ${content}`;
client.logQueue.push(content);
return content;
Expand Down
7 changes: 7 additions & 0 deletions bot/events/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ module.exports = {
return await interaction.deferReply(option)
}
}

var logString = `COMMAND: \`${interaction.customId}\`, GUILD: \`${interaction.guild.name} (ID:${interaction.guildId})\`, ` +
`CHANNEL: \`${interaction.channel.name}, (ID:${interaction.channel.id})\`` +
`USER: \`${interaction.user.tag}, (ID:${interaction.user.id})\``;

client.emit("addLogQueue", "MESSAGE_INTERACTION", "EXECUTE", new Date(), logString);

if (client.interactions.has(interaction.customId.split(":")[0])) {
return client.interactions.get(interaction.customId.split(":")[0]).exec(interaction, res);
} else {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "irassai-bot",
"version": "2.2.3",
"version": "2.2.4",
"description": "新・いらっさいbot",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions updates.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.2.4
Fix logging bug (Month was not correctly shown)
Added message interaction logger

2.2.3
Logs member join and leave

Expand Down

0 comments on commit d4ad39a

Please sign in to comment.