discord.utilitys
v1.2.1
Published
A Package for discord with logs
Downloads
1
Readme
Discord-Logs
Sehr Einfaches Log Package für Discord. ES gibt 2 Optionen für das logen von Aktionen.
Bot 1
Das ist die erste Möglichkeit, in dem wir Verschiedene Channel für Verschiedene Logs nehmen.
const Logging = require('discord.logs')
const Logs = new Logging.Modlogs()
client.on("channelCreate", (channel) => {
Logs.chCreate(client, channel, {
chid: "changeable channel id for every function",
});
});
client.on("channelPinsUpdate", (channel, time) => {
Logs.chpinsUpdate(client, channel, time, {
chid: "changeable channel id for every function",
});
});
client.on("channelDelete", (channel) => {
Logs.chdel(client, channel, {
chid: "changeable channel id for every function",
});
});
client.on("channelUpdate", (oldChannel, newChannel) => {
Logs.chUpdate(client, oldChannel, newChannel, {
chid: "changeable channel id for every function",
});
});
client.on("emojiDelete", (emoji) => {
Logs.eDel(client, emoji, {
chid: "changeable channel id for every function",
});
});
client.on("emojiCreate", (emoji) => {
Logs.eCreate(client, emoji, {
chid: "changeable channel id for every function",
});
});
client.on("emojiUpdate", (old, news) => {
Logs.eUpdate(client, old, news, {
chid: "changeable channel id for every function",
});
});
client.on("guildBanAdd", (ban) => {
Logs.gba(client, ban, {
chid: "changeable channel id for every function",
});
});
client.on("guildBanRemove", (ban) => {
Logs.gbr(client, ban, {
chid: "changeable channel id for every function",
});
});
client.on("guildMemberAdd", (member) => {
Logs.gma(client, member, {
chid: "changeable channel id for every function",
});
});
client.on("guildMembersChunk", (members, guild) => {
Logs.gmc(client, members, guild, {
chid: "changeable channel id for every function",
});
});
client.on("guildMemberRemove", (member) => {
Logs.gmr(client, member, {
chid: "changeable channel id for every function",
});
});
client.on("guildMemberUpdate", (member, newMember) => {
Logs.gmu(client, member, newMember, {
chid: "changeable channel id for every function",
});
});
client.on("inviteCreate", (invite) => {
Logs.invc(client, invite, {
chid: "changeable channel id for every function",
});
});
client.on("inviteDelete", (invite) => {
Logs.invd(client, invite, {
chid: "changeable channel id for every function",
});
});
client.on("messageDelete", (message) => {
Logs.md(client, message, {
chid: "changeable channel id for every function",
});
});
client.on("messageUpdate", (oldmessage, newmessage) => {
Logs.mu(client, oldmessage, newmessage, {
chid: "changeable channel id for every function",
});
});
client.on("roleCreate", (role) => {
Logs.rc(client, role, {
chid: "changeable channel id for every function",
});
});
client.on("roleDelete", (role) => {
Logs.rd(client, role, {
chid: "changeable channel id for every function",
});
});
client.on("roleUpdate", (role, role2) => {
Logs.ru(client, role, role2, {
chid: "changeable channel id for every function",
});
});
Bot 2
Das ist die 2 Möglichkeit mit nur einen Channel.
const Discord_logs = require('discord-logs')
const logs = new Discord_logs.Logs({
chid: 'Deine channel ID'
})
client.on("channelCreate", (channel) => {
Logs.chCreate(client, channel);
});
client.on("channelPinsUpdate", (channel, time) => {
Logs.chpinsUpdate(client, channel, time);
});
client.on("channelDelete", (channel) => {
Logs.chdel(client, channel);
});
client.on("channelUpdate", (oldChannel, newChannel) => {
Logs.chUpdate(client, oldChannel, newChannel);
});
client.on("emojiDelete", (emoji) => {
Logs.eDel(client, emoji);
});
client.on("emojiCreate", (emoji) => {
Logs.eCreate(client, emoji);
});
client.on("emojiUpdate", (old, news) => {
Logs.eUpdate(client, old, news);
});
client.on("guildBanAdd", (ban) => {
Logs.gba(client, ban);
});
client.on("guildBanRemove", (ban) => {
Logs.gbr(client, ban);
});
client.on("guildMemberAdd", (member) => {
Logs.gma(client, member);
});
client.on("guildMembersChunk", (members, guild) => {
Logs.gmc(client, members, guild);
});
client.on("guildMemberRemove", (member) => {
Logs.gmr(client, member);
});
client.on("guildMemberUpdate", (member, newMember) => {
Logs.gmu(client, member, newMember);
});
client.on("inviteCreate", (invite) => {
Logs.invc(client, invite);
});
client.on("inviteDelete", (invite) => {
Logs.invd(client, invite);
});
client.on("messageDelete", (message) => {
Logs.md(client, message);
});
client.on("messageUpdate", (oldmessage, newmessage) => {
Logs.mu(client, oldmessage, newmessage);
});
client.on("roleCreate", (role) => {
Logs.rc(client, role);
});
client.on("roleDelete", (role) => {
Logs.rd(client, role);
});
client.on("roleUpdate", (role, role2) => {
Logs.ru(client, role, role2);
});
Erklärung
Die erste Möglichkeit ist für ein bot der nicht nur auf ein Sever ist sonder auf vilen, und die zweite möglichkeit ist für ein einzelen Sever :D