Event Logger aims to provide more information than the Audit Log and allows you to respond with custom actions on events.
Event Logger for Discord with custom actions (in JS) on event triggers.
Aims to provide more information than the Audit Log and allows you to respond with multiple custom actions when an event occurs.
Some examples:
If you'd like to use the bot how it is, without customising it feel free to click here to invite it to your server.
It requires several permissions, the biggest being managing roles. You are free to remove any that you think are too dangerous. Note that the bot will not be able to function entirely if you do remove them.
npm install
tsc
node ./dist/index.js
When the bot joins a server you'll need to set the log channel before anything can happen. All commands are case insensitive. Arguments to them are not.
All commands excluding !SetLogChannel must be executed from the log channel.
Log channel redirects further enhance the ability to log individual events to different channels (one event may have multiple logging channels).
Sets the logging channel (and command channel) to use. Only an ADMINISTRATOR can execute this command. It may be executed from any channel. Use by mentioning a channel.
User> !setlogchannel #event_log
Bot> Set the log channel to 123456789
Lists all events currently monitored by the bot (and logging).
User> !Events
Bot> Actively Logged Events:
guildChannelPermissionsChanged
guildMemberBoost
guildMemberUnboost
guildMemberRoleAdd
guildMemberRoleRemove
guildMemberNicknameUpdate
Adds one or more events separated by a space to the database for the guild. Events may be any text, but must correspond to an event in the master list shown below to have any effect.
User> !addevents guildMemberOnline guildMemberOffline
Bot> Successfully added 2 event(s) to be logged.
Removes one or more events separated by a space from the database for the guild.
User> !removeevents guildMemberOnline guildMemberOffline
Bot> Successfully removed 2 event(s).
Lists all event actions that have been added to the guild.
User> !EventActions
Bot> Event Actions in Place:
Identifier: 5e660564026d0c7d2cf3bc7f
Event: messageReactionAdd
Code:
if (emoji.name == 'barcHug' ) {
toggleRoleById('686466070693019679');
removeReactionByEmojiName('🦄');
} else if (emoji.name == '🦄' ) {
removeReactionByEmojiName('barcHug');
}
Identifier: 5e6612673d41310651586001
Event: messageContentEdited
Code: log('Hello!');
Adds a single event action to an event, events can have any number of event actions.
User> !addEventAction messageContentEdited
log('Hello!');
Bot> Successfully added an event action.
Removes a single unique event action.
User> !removeEventAction 5e6612673d41310651586001
Bot> Successfully removed an event action with identifier 5e6612673d41310651586001.
Lists all log channel redirects on the guild.
When a redirect is in place it will not post to the default log channel.
Each event can have multiple log channels that they post in.
User> !LogChannels
Bot> Log channel redirects in Place:
Identifier: 5eba70865640a65be2a51ccd
Event: messageReactionAdd
Log Channel: another_reaction_log - ID: 53181564338605952
Identifier: 5eba71026eadcf5cc27ssda
Event: messageReactionAdd
Log Channel: some_channel2 - ID: 74261227326558539
Adds multiple log channel redirects for the specified event.
User> !addlogchannels messageContentEdited #test_log #test_log2 #testlog_3
Bot> Successfully added log channel redirects.
Removes multiple unique log channel redirects given the id's from !LogChannels.
User> !removelogchannels 5e6612673d41310651586001 5e6612673d41310651586002 5e6612673d41310651586003
Bot> Successfully removed the selected log channel redirects.
'guildChannelPermissionsChanged',
'guildMemberBoost',
'guildMemberUnboost',
'guildMemberRoleAdd',
'guildMemberRoleRemove',
'guildMemberNicknameUpdate',
'guildBoostLevelUp',
'guildBoostLevelDown',
'guildRegionUpdate',
'guildBannerAdd',
'guildAfkChannelAdd',
'guildVanityURLAdd',
'messagePinned',
'messageContentEdited',
'userAvatarUpdate',
'userUsernameUpdate',
'voiceChannelJoin',
'voiceChannelLeave',
'voiceChannelSwitch',
'voiceChannelMute',
'voiceChannelDeaf',
'voiceChannelUnmute',
'voiceChannelUndeaf',
'voiceStreamingStart',
'voiceStreamingStop',
'guildMemberAdd',
'guildMemberRemove',
'messageDelete',
'messageDeleteBulk',
'rolePositionUpdate',
'guildMemberOffline',
'guildMemberOnline',
'unhandledRoleUpdate',
'unhandledUserUpdate',
'unhandledVoiceStateUpdate',
'unhandledMessageUpdate',
'unhandledPresenceUpdate',
'unhandledGuildChannelUpdate',
'unhandledGuildMemberUpdate',
'messageReactionAdd',
'messageReactionRemove',
'messageReactionRemoveAll'
'message'
Action code makes use of the JS-Interpreter library. This handles ES5 JS only. It's quite simple, write your response to an event in JS using functions and variables available to the event.
The functions available in the JS Interpreter include those listed in InterpreterFunctions class.
The custom global variables will depend on what event was fired. For a complete list of when each variable appears check out this InterpreterOptions interface.
Global variables are discord.js objects but have been stripped of all nested objects and arrays to support JS-Interpreter.
Only the top level properties that are not objects or arrays are kept when copying the discord.js object into the global object.
4
1 review
Reviews can be left only by registered users. All reviews are moderated by Top.gg moderators. Please make sure to check our guidelines before posting.
5 stars
0
4 stars
1
3 stars
0
2 stars
0
1 star
0
Details
Prefix
!
Socials
Tags
Creators