Skip to content

Commit

Permalink
UWU
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark-LYNN committed Jan 12, 2025
1 parent b39572c commit ed422b1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dev": "NODE_ENV=development ts-node -r tsconfig-paths/register src/index.ts"
},
"dependencies": {
"@tryforge/forge.db": "github:tryforge/forgedb#dev",
"@tryforge/forge.db": "github:tryforge/ForgeDB#dev",
"@tryforge/forge.topgg": "github:tryforge/ForgeTopGG#dev",
"axios": "^1.7.9",
"discord.js": "^14.16.3",
Expand Down
4 changes: 0 additions & 4 deletions src/commands/events/onReady.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ const onReady: Event[] = [{
version: '1.0',
code: `
$logger[Info;$username[$clientID] | Running with "$commandCount" commands]
$setGlobalVar[sessionMessageUses;0]
$setGlobalVar[sessionSlashUses;0]
$setGlobalVar[sessionButtonUses;0]
$setGlobalVar[sessionErrors;0]
`
}];

Expand Down
8 changes: 8 additions & 0 deletions src/dataBase/connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
type: "connect",
code: `$logger[Info;Database Connected with ping of "$dbPingms"]
$setGlobalVar[sessionMessageUses;0]
$setGlobalVar[sessionSlashUses;0]
$setGlobalVar[sessionButtonUses;0]
$setGlobalVar[sessionErrors;0]`
};
14 changes: 8 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ const topgg = new ForgeTopGG({
// [ Database Setup ] //
/// ////////////////////////////

/*
const database = new ForgeDB({
type: 'mysql',
host: process.env.DATABASE_IP,
port: 4020,
username: process.env.DATABASE_USERNAME,
password: process.env.DATABASE_PASSWORD,
database: "akiradb"
});*/
database: "akiradb",
events: ['connect']
});

/// ////////////////////////////
// [ Client Setup ] //
Expand All @@ -74,18 +74,20 @@ const client = new ForgeClient({
'<@$clientID>'
],
extensions: [
// database,
new ForgeDB(),
database,
new ForgeQuirks(),
// topgg
]
});

// Load functions, variables and commands
client.functions.load(join(__dirname, 'functions'));
ForgeDB.variables(variables);
client.commands.load(commandsPath);
client.applicationCommands.load(slashCommandsPath);

database.commands.load(join(__dirname, 'dataBase'));
database.variables(variables);

//topgg.commands.load(topGgPath);

/// ////////////////////////////
Expand Down
8 changes: 7 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { CommandType, IForgeFunction, IBaseCommand, IApplicationCommandData } from "@tryforge/forgescript";
import { IDBEvents } from "@tryforge/forge.db/dist/structures";

type ModuleList = 'clientSpecific' | 'dev' | 'automation' | 'automod' | 'economy' | 'leveling' | 'moderation' | 'fun' | 'permissions' | 'premium' | 'profile' | 'reactionRoles' | 'roleplay' | 'search' | 'settings' | 'utility';
type topggEvent = 'voted' | 'error' | 'posted';
type ForgeEvent = 'ready' | 'guildCreate' | 'error' | 'messageCreate' | 'shardReady' | 'shardDisconnect';
type ForgeEvent = 'ready' | 'guildCreate' | 'error' | 'messageCreate' | 'shardReady' | 'shardDisconnect' ;

export interface CustomFunction extends IForgeFunction {
version?: string;
Expand Down Expand Up @@ -39,4 +40,9 @@ export interface Event {
export interface ISlash extends IApplicationCommandData {
usage?: string;
module?: ModuleList
}

export interface DBEvent {
type: 'connect';
code: string;
}

0 comments on commit ed422b1

Please sign in to comment.