Skip to content

Commit

Permalink
Revert "chore: upstream latest changes to dev (#58)"
Browse files Browse the repository at this point in the history
This reverts commit 112ca41.
  • Loading branch information
notscrappie authored Dec 8, 2023
1 parent 112ca41 commit a4aa4d1
Show file tree
Hide file tree
Showing 38 changed files with 849 additions and 879 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ node_modules
dist
src/config.ts
package-lock.json
json.sqlite
.idea
json.sqlite
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<h3 align=center>Unleash the full potential of your server.</h3>

<div align=center>
<img src="https://img.shields.io/github/stars/shadowrunners/Evelyn?style=for-the-badge" />
<img src="https://forthebadge.com/images/badges/built-with-love.svg">
</a>

<a href="#">
<img src="https://img.shields.io/discord/838499177243738172?style=for-the-badge" />
<img src="https://forthebadge.com/images/badges/contains-tasty-spaghetti-code.svg"
</a>

<a href="https://buymeacoffee.com/scr3ppie">
<img src="https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?style=for-the-badge"
<img src="https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?style=for-the-badge"
</a>
</div>

Expand All @@ -27,7 +27,7 @@ Evelyn is an open-source Discord Bot made as a safe alternative to bots that are
- 🎧 **Music**: `music play`, `music volume`, `music queue`, `music skip`, `music pause`, `music resume`, `music stop`, `music shuffle`, `music lyrics`.
- 📦 **Miscellaneous**: `avatar`, `anime`, `announce`, `leaderboard`, `movie`, `rank`, `remind`, `show`, `userinfo`, `serverinfo`.
- 😀 **Actions**: `actions (bite, blush, bonk, bully, cringe, cry, cuddle, handhold, highfive, hug, kill, kiss, pat poke, slap, smile, wave, yeet)`
- 📷 **Fun**: `cat`, `image (awooify, baguette, blurpify, captcha, changemymind, deepfry, kannagen, phcomment, threats, trash, trumptweet, tweet)`.
- 📷 **Fun**: `cat`, `game (2048, 8ball, connect4, findemoji, guessthatpokemon, hangman, minesweeper, rps, snake, tictactoe, trivia, wordle, wouldyourather)`, `image (awooify, baguette, blurpify, captcha, changemymind, deepfry, kannagen, phcomment, threats, trash, trumptweet, tweet)`.

## Credits
> DISCLAIMER: Evelyn uses various APIs but is not endorsed nor certified by the respective teams that actively maintain these APIs.
Expand All @@ -42,6 +42,8 @@ Evelyn is powered by the following APIs:
- [waifu.pics](https://waifu.pics) - used for the actions system
- [NekoBot](https://nekobot.xyz) - used for the image system



If we used your code and forgot to add you to the credits, shoot me a message over on Discord at scrappie#5451.

To avoid confusion with our hosted version of Evelyn, you are not allowed to publicly host another instance of Evelyn under the same name and use the same avatar.
6 changes: 6 additions & 0 deletions nodemon.json
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"
}
73 changes: 24 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,38 @@
"main": "dist/launch.js",
"type": "module",
"scripts": {
"start": "tsx launch.ts",
"build": "tsup --watch",
"dev": "tsx --watch launch.ts",
"debug": "tsx --inspect --watch src/launch.ts"
},
"files": [
"dist"
],
"tsup": {
"dts": true,
"bundle": false,
"treeshake": true,
"target": "node16",
"format": [
"esm"
],
"entry": [
"src/**/*.ts",
"launch.ts"
]
"start": "ts-node-esm ./src/launch.ts",
"dev": "nodemon"
},
"dependencies": {
"@colors/colors": "^1.6.0",
"@discordx/importer": "^1.3.0",
"@discordx/utilities": "^6.1.0",
"@sentry/browser": "^7.86.0",
"@sentry/cli": "^2.23.0",
"@sentry/node": "^7.86.0",
"@sentry/profiling-node": "^1.2.6",
"@shadowrunners/automata": "^2.4.3",
"@discordx/importer": "^1.2.2",
"@discordx/utilities": "^5.2.1",
"@shadowrunners/automata": "^2.4.1",
"captcha-canvas": "^3.2.1",
"cryptr": "^6.3.0",
"discord-arts": "^0.5.8",
"cryptr": "^6.2.0",
"discord-arts": "^0.4.0",
"discord-economy-super": "^1.7.6",
"discord-giveaways-super": "^1.0.9",
"discord-html-transcripts": "^3.2.0",
"discord-giveaways-super": "^1.0.0",
"discord-html-transcripts": "^3.1.5",
"discord-xp": "github:MrAugu/discord-xp",
"discord.js": "^14.14.1",
"discordx": "^11.9.0",
"genius-lyrics": "^4.4.6",
"glob": "^10.3.10",
"mongoose": "^8.0.3",
"ms": "^2.1.3",
"musicard": "^1.5.2",
"discord.js": "^14.12.1",
"discordx": "^11.7.6",
"genius-lyrics": "^4.4.3",
"glob": "^10.3.3",
"mongoose": "^7.4.2",
"node-replicate": "^2.0.0",
"superagent": "^8.1.2"
"superagent": "^8.0.9"
},
"devDependencies": {
"@types/ms": "^0.7.34",
"@types/superagent": "^4.1.24",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.55.0",
"prettier": "^3.1.0",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"typescript": "^5.3.3"
"@types/superagent": "^4.1.18",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint": "^8.46.0",
"nodemon": "^3.0.1",
"prettier": "^3.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"repository": {
"type": "git",
Expand All @@ -73,4 +48,4 @@
"url": "https://github.com/shadowrunners/evelyn/issues"
},
"homepage": "https://github.com/shadowrunners/evelyn#readme"
}
}
2 changes: 1 addition & 1 deletion src/Commands/Developer/status.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChatInputCommandInteraction, EmbedBuilder } from 'discord.js';
import { Util } from '../../Utils/Utils/Util.js';
import { Util } from '../../Utils/Utils/util.js';
import { Discord, Slash, Guild } from 'discordx';
import { config } from '../../config.js';
import { Evelyn } from '../../Evelyn.js';
Expand Down
4 changes: 2 additions & 2 deletions src/Evelyn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class Evelyn extends Client {
process.on('unhandledRejection', (err) => console.log(err));
process.on('unhandledException', (err) => console.log(err));
}

/**
* Loads music events.
* @param {Evelyn} client - The client object.
Expand All @@ -116,7 +116,7 @@ export class Evelyn extends Client {
/** Imports all commands and events then launches a new instance of the bot. */
public async launch() {
await importx(
`${dirname(import.meta.url)}/{Events/djxManaged,Commands}/**/*.{ts,js}`,
`${dirname(import.meta.url)}/{events/djxManaged,commands}/**/*.{ts,js}`,
);

await this.loadMusic(this);
Expand Down
4 changes: 2 additions & 2 deletions src/Events/djxManaged/Guild/guildCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { Discord, On } from 'discordx';
@Discord()
export class CreateGuildData {
@On({ event: 'guildCreate' })
async createData([guild]: [Guild], client: Evelyn) {
async createData(guild: Guild, client: Evelyn) {
const { name, memberCount, id } = guild;
const webhook = new WebhookClient({ url: client.config.debug.watcherHook });

await DB.create({ guildId: id });
await DB.create({ id });

const embed = new EmbedBuilder()
.setColor('Blurple')
Expand Down
4 changes: 2 additions & 2 deletions src/Events/djxManaged/Guild/guildDelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { Discord, On } from 'discordx';
@Discord()
export class ClearGuildData {
@On({ event: 'guildDelete' })
async deleteData([guild]: [Guild], client: Evelyn) {
async deleteData(guild: Guild, client: Evelyn) {
const { iconURL, name, memberCount, id } = guild;
const webhook = new WebhookClient({ url: client.config.debug.watcherHook });

await DB.findOneAndDelete({
guildId: id,
id,
});

const embed = new EmbedBuilder()
Expand Down
4 changes: 1 addition & 3 deletions src/Events/djxManaged/Interaction/interactionCreate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { isBlacklisted } from '../../../Utils/Helpers/isBlacklisted.js';
// import { captureException } from '@sentry/browser';
import { isBlacklisted } from '../../../Utils/Utils/isBlacklisted.js';
import { Discord, On, ArgsOf } from 'discordx';
import { Evelyn } from '../../../Evelyn.js';

Expand All @@ -16,7 +15,6 @@ export class OnInteraction {
}
catch (err) {
console.log(err);
// return captureException(err);
}
}
}
45 changes: 8 additions & 37 deletions src/Events/djxManaged/Logging/channelCreate.ts
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);
}
}
48 changes: 11 additions & 37 deletions src/Events/djxManaged/Logging/channelDelete.ts
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);
}
}
Loading

0 comments on commit a4aa4d1

Please sign in to comment.