-
-
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.
Revert "chore: upstream latest changes to dev (#58)"
This reverts commit 112ca41.
- Loading branch information
1 parent
112ca41
commit a4aa4d1
Showing
38 changed files
with
849 additions
and
879 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,5 +3,4 @@ node_modules | |
dist | ||
src/config.ts | ||
package-lock.json | ||
json.sqlite | ||
.idea | ||
json.sqlite |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts,json", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "ts-node-esm ./src/launch.ts" | ||
} |
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,46 +1,17 @@ | ||
import { getAuditLog, send, validate } from '../../../Utils/Helpers/loggerUtils.js'; | ||
import { AuditLogEvent, EmbedBuilder, GuildChannel } from 'discord.js'; | ||
import { OWLogs, validate } from '../../../Utils/Utils/OWLogs.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) { | ||
if (!await validate(channel.guildId)) return; | ||
const { guild } = channel; | ||
|
||
const audit = await getAuditLog({ | ||
type: AuditLogEvent.ChannelCreate, | ||
guild: channel.guild, | ||
}); | ||
if (!(await validate(guild))) return; | ||
const logs = new OWLogs(guild, client); | ||
|
||
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, | ||
}); | ||
return await logs.channelCreate(channel); | ||
} | ||
} |
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,46 +1,20 @@ | ||
import { getAuditLog, send, validate } from '../../../Utils/Helpers/loggerUtils.js'; | ||
import { AuditLogEvent, EmbedBuilder, GuildChannel } from 'discord.js'; | ||
import { OWLogs, validate } from '../../../Utils/Utils/OWLogs.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) { | ||
if (!await validate(channel.guildId)) return; | ||
async channelDelete( | ||
[channel]: [GuildChannel], | ||
client: Evelyn, | ||
): Promise<APIMessage> { | ||
const { guild } = channel; | ||
|
||
const audit = await getAuditLog({ | ||
type: AuditLogEvent.ChannelDelete, | ||
guild: channel.guild, | ||
}); | ||
if (!(await validate(guild))) return; | ||
const logs = new OWLogs(guild, client); | ||
|
||
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, | ||
}); | ||
return await logs.channelDelete(channel); | ||
} | ||
} |
Oops, something went wrong.