-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upstream latest changes to dev (#58)
- Loading branch information
1 parent
0d803c4
commit 112ca41
Showing
38 changed files
with
879 additions
and
849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules | |
dist | ||
src/config.ts | ||
package-lock.json | ||
json.sqlite | ||
json.sqlite | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,46 @@ | ||
import { OWLogs, validate } from '../../../Utils/Utils/OWLogs.js'; | ||
import { getAuditLog, send, validate } from '../../../Utils/Helpers/loggerUtils.js'; | ||
import { AuditLogEvent, EmbedBuilder, GuildChannel } from 'discord.js'; | ||
import { Evelyn } from '../../../Evelyn.js'; | ||
import { GuildChannel } from 'discord.js'; | ||
import { Discord, On } from 'discordx'; | ||
|
||
@Discord() | ||
export class ChannelCreate { | ||
@On({ event: 'channelCreate' }) | ||
export class channelCreate { | ||
@On({ event: 'channelCreate' }) | ||
async channelCreate([channel]: [GuildChannel], client: Evelyn) { | ||
const { guild } = channel; | ||
if (!await validate(channel.guildId)) return; | ||
|
||
if (!(await validate(guild))) return; | ||
const logs = new OWLogs(guild, client); | ||
const audit = await getAuditLog({ | ||
type: AuditLogEvent.ChannelCreate, | ||
guild: channel.guild, | ||
}); | ||
|
||
return await logs.channelCreate(channel); | ||
const embed = new EmbedBuilder() | ||
.setColor('Blurple') | ||
.setAuthor({ | ||
name: channel.guild.name, | ||
iconURL: channel.guild.iconURL(), | ||
}) | ||
.setTitle('Channel Created') | ||
.addFields( | ||
{ | ||
name: '🔹 | Channel Name', | ||
value: `> ${channel.name}`, | ||
}, | ||
{ | ||
name: '🔹 | ID', | ||
value: `> ${channel.id}`, | ||
}, | ||
{ | ||
name: '🔹 | Created by', | ||
value: `> ${audit.executor}`, | ||
}, | ||
) | ||
.setTimestamp(); | ||
|
||
return await send({ | ||
guild: channel.guildId, | ||
client, | ||
embed, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,46 @@ | ||
import { OWLogs, validate } from '../../../Utils/Utils/OWLogs.js'; | ||
import { getAuditLog, send, validate } from '../../../Utils/Helpers/loggerUtils.js'; | ||
import { AuditLogEvent, EmbedBuilder, GuildChannel } from 'discord.js'; | ||
import { Evelyn } from '../../../Evelyn.js'; | ||
import { APIMessage, GuildChannel } from 'discord.js'; | ||
import { Discord, On } from 'discordx'; | ||
|
||
@Discord() | ||
export class ChannelDelete { | ||
export class channelDelete { | ||
@On({ event: 'channelDelete' }) | ||
async channelDelete( | ||
[channel]: [GuildChannel], | ||
client: Evelyn, | ||
): Promise<APIMessage> { | ||
const { guild } = channel; | ||
async channelDelete([channel]: [GuildChannel], client: Evelyn) { | ||
if (!await validate(channel.guildId)) return; | ||
|
||
if (!(await validate(guild))) return; | ||
const logs = new OWLogs(guild, client); | ||
const audit = await getAuditLog({ | ||
type: AuditLogEvent.ChannelDelete, | ||
guild: channel.guild, | ||
}); | ||
|
||
return await logs.channelDelete(channel); | ||
const embed = new EmbedBuilder() | ||
.setColor('Blurple') | ||
.setAuthor({ | ||
name: channel.guild.name, | ||
iconURL: channel.guild.iconURL(), | ||
}) | ||
.setTitle('Channel Deleted') | ||
.addFields( | ||
{ | ||
name: '🔹 | Channel Name', | ||
value: `> ${channel.name}`, | ||
}, | ||
{ | ||
name: '🔹 | ID', | ||
value: `> ${channel.id}`, | ||
}, | ||
{ | ||
name: '🔹 | Deleted by', | ||
value: `> ${audit.executor}`, | ||
}, | ||
) | ||
.setTimestamp(); | ||
|
||
return await send({ | ||
guild: channel.guildId, | ||
client, | ||
embed, | ||
}); | ||
} | ||
} |
Oops, something went wrong.