This commit is contained in:
Lea 2023-03-17 18:01:33 +01:00
parent ef51daecfe
commit 7d7fca9d0c
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

View file

@ -207,6 +207,7 @@ client.on('message', async (message) => {
const args = message.content.replace(/ +/g, ' ').split(' '); const args = message.content.replace(/ +/g, ' ').split(' ');
if (args.shift()?.toLowerCase() != '/kibby') return; if (args.shift()?.toLowerCase() != '/kibby') return;
const logs = client.channels.get(process.env.LOGS!);
const privileged = message.member?.hasPermission(message.channel?.server!, 'ManageMessages'); const privileged = message.member?.hasPermission(message.channel?.server!, 'ManageMessages');
if (!privileged && db.data?.probation.includes(message.author_id)) { if (!privileged && db.data?.probation.includes(message.author_id)) {
@ -266,6 +267,9 @@ client.on('message', async (message) => {
await client.users.edit({ await client.users.edit({
remove: ['StatusText'] 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: [ await message.reply({ embeds: [
embed('Status cleared!', undefined, 'SUCCESS'), embed('Status cleared!', undefined, 'SUCCESS'),
] }); ] });
@ -277,6 +281,9 @@ client.on('message', async (message) => {
text: status, 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: [ await message.reply({ embeds: [
embed('Status set!', undefined, 'SUCCESS'), embed('Status set!', undefined, 'SUCCESS'),
] }); ] });
@ -297,6 +304,10 @@ client.on('message', async (message) => {
await target.kick(); await target.kick();
await message.reply('[](https://autumn.revolt.chat/attachments/KosQrwl31AMxA0nLtwL1DFIvvZiPE2pYtr7DwAGJNF/928247511842431016.gif)'); 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; break;
} }