add logs
This commit is contained in:
parent
ef51daecfe
commit
7d7fca9d0c
11
src/index.ts
11
src/index.ts
|
@ -207,6 +207,7 @@ client.on('message', async (message) => {
|
|||
const args = message.content.replace(/ +/g, ' ').split(' ');
|
||||
if (args.shift()?.toLowerCase() != '/kibby') return;
|
||||
|
||||
const logs = client.channels.get(process.env.LOGS!);
|
||||
const privileged = message.member?.hasPermission(message.channel?.server!, 'ManageMessages');
|
||||
|
||||
if (!privileged && db.data?.probation.includes(message.author_id)) {
|
||||
|
@ -266,6 +267,9 @@ client.on('message', async (message) => {
|
|||
await client.users.edit({
|
||||
remove: ['StatusText']
|
||||
});
|
||||
await logs?.sendMessage({ embeds: [
|
||||
embed(`<@${message.author_id}> (${message.author_id}) cleared the bot's status.`, 'Status cleared by user', 'INFO'),
|
||||
] });
|
||||
await message.reply({ embeds: [
|
||||
embed('Status cleared!', undefined, 'SUCCESS'),
|
||||
] });
|
||||
|
@ -277,6 +281,9 @@ client.on('message', async (message) => {
|
|||
text: status,
|
||||
},
|
||||
});
|
||||
await logs?.sendMessage({ embeds: [
|
||||
embed(`<@${message.author_id}> (${message.author_id}) set the bot's status to:\n\n>${status.replace(/\n/g, '>')}`, 'Status cleared by user', 'INFO'),
|
||||
] });
|
||||
await message.reply({ embeds: [
|
||||
embed('Status set!', undefined, 'SUCCESS'),
|
||||
] });
|
||||
|
@ -297,6 +304,10 @@ client.on('message', async (message) => {
|
|||
await target.kick();
|
||||
await message.reply('[](https://autumn.revolt.chat/attachments/KosQrwl31AMxA0nLtwL1DFIvvZiPE2pYtr7DwAGJNF/928247511842431016.gif)');
|
||||
|
||||
await logs?.sendMessage({ embeds: [
|
||||
embed(`<@${message.author_id}> (${message.author_id}) committed suicide`, 'Self kick', 'INFO'),
|
||||
] });
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue