-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a7ace79
Showing
83 changed files
with
9,692 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
MONGODB_URL="" | ||
|
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,57 @@ | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
*.swp | ||
|
||
pids | ||
results | ||
tmp | ||
|
||
# Build | ||
public/css/main.css | ||
|
||
# Coverage reports | ||
coverage | ||
|
||
# # API keys and secrets | ||
# .env | ||
|
||
# Dependency directory | ||
node_modules | ||
bower_components | ||
|
||
# Editors | ||
.idea | ||
*.iml | ||
|
||
# OS metadata | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Ignore built ts files | ||
dist/**/* | ||
|
||
# ignore yarn.lock | ||
yarn.lock | ||
|
||
*.ignore.* | ||
|
||
bin | ||
|
||
tokens/* | ||
!tokens/.gitkeep | ||
|
||
prisma/data/* | ||
|
||
cache/* | ||
!cache/.gitkeep | ||
|
||
logs/* | ||
!logs/.gitkeep | ||
|
||
cmdhash-* |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Hynax Discord Bot - All In One Discord Bot | ||
|
||
## Introduction | ||
|
||
Hynaxv2 is an open-source Discord bot built using OceanicJS and is the successor to my old bot Hynaxv1. It offers a wide range of features including announcements, verification, information panels, polls, moderation, automoderation, message purging, reaction roles, reporting, and a ticket system. | ||
|
||
## Getting Started... | ||
|
||
To use the Hynax bot, follow these steps: | ||
Honestly it's not hard to use this bot its a a single command to setup | ||
Just do /setup or /config and configure the bot to your likings | ||
|
||
You will also need MongoDB in cluster mode in order for this to work. | ||
|
||
## Features | ||
|
||
Announcements | ||
|
||
Hynax can make announcements in your server. | ||
|
||
Verification | ||
|
||
Set up a verification system for your server. | ||
|
||
Information Panels | ||
|
||
Display various server information panels. | ||
|
||
Polls | ||
|
||
Create polls for your server members to vote on. | ||
|
||
Moderation | ||
|
||
Hynax offers moderation features to help keep your server clean and safe. | ||
|
||
Automoderation | ||
|
||
Automate certain moderation tasks for your server. | ||
|
||
Message Purging | ||
|
||
Easily delete messages in your server. | ||
|
||
Reaction Roles | ||
|
||
Assign roles to members based on their reactions to messages. | ||
|
||
Reporting | ||
|
||
Implement a reporting system to handle user reports. | ||
|
||
Other Panels | ||
|
||
Access other panels and features for your server. | ||
|
||
Ticket System | ||
|
||
Create a ticket system for support and assistance. | ||
|
||
Suggestions | ||
|
||
Gather suggestions from your server members. | ||
|
||
## Contributing | ||
You are welcome to contribute to the development of Hynax by making pull requests to make certain features configurable and to improve the functionality of the bot. | ||
|
||
## Support | ||
If you encounter any issues, need help, or have questions, please refer to the project's GitHub repository for documentation and support. Or you can always add me on discord: @ohemilyy | ||
|
||
## License | ||
Hynax is licensed under the GNU GENERAL PUBLIC License. See the LICENSE file for more information. | ||
|
||
|
||
I appreciate your interest in Hynax, I we hope this documentation helps you get started with the bot and its features. Feel free to contribute and make the bot even better for the Discord community. | ||
|
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,24 @@ | ||
import { Interaction, CreateMessageOptions } from "oceanic.js"; | ||
import { Logger } from "pino"; | ||
import { ModalSubmitOptionResolver } from "./src/helpers/ModalSubmitOptionResolver"; | ||
|
||
declare module "oceanic.js" { | ||
interface Interaction { | ||
colors: { | ||
default: number; | ||
success: number; | ||
error: number; | ||
}; | ||
getDefaultReply: (text: string) => CreateMessageOptions; | ||
getSuccessReply: (text: string) => CreateMessageOptions; | ||
getErrorReply: (text: string) => CreateMessageOptions; | ||
} | ||
|
||
interface ModalSubmitInteraction { | ||
options: ModalSubmitOptionResolver; | ||
} | ||
|
||
interface Client { | ||
logger: Logger; | ||
} | ||
} |
Empty file.
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,32 @@ | ||
{ | ||
"name": "hynaxv2", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "ts-node src/bot.ts", | ||
"build": "tsc", | ||
"ts-node": "ts-node", | ||
"ready": "npx prisma generate && npx prisma migrate dev", | ||
"prisma-generate": "npx prisma generate", | ||
"prisma-migrate": "npx prisma migrate dev" | ||
}, | ||
"dependencies": { | ||
"@prisma/client": "^4.16.1", | ||
"@swc/core": "^1.3.32", | ||
"humanize-duration": "^3.28.0", | ||
"node-schedule": "^2.1.1", | ||
"oceanic.js": "^1.4.1", | ||
"pino": "^8.8.0", | ||
"pino-pretty": "^9.1.1", | ||
"timestring": "^7.0.0", | ||
"ts-node": "^10.9.1", | ||
"yaml": "^2.2.1" | ||
}, | ||
"devDependencies": { | ||
"@types/humanize-duration": "^3.27.1", | ||
"@types/node": "^18.11.19", | ||
"@types/node-schedule": "^2.1.0", | ||
"@types/timestring": "^6.0.2", | ||
"prisma": "^4.16.1", | ||
"typescript": "^4.9.5" | ||
} | ||
} |
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,168 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "mongodb" | ||
url = env("MONGODB_URL") | ||
} | ||
|
||
//=================================================================== | ||
// Guild General | ||
//=================================================================== | ||
model GuildGeneralPanel { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String @unique | ||
logChannelID String @default("") | ||
defaultEmbedColorHex String @default("") | ||
successEmbedColorHex String @default("") | ||
errorEmbedColorHex String @default("") | ||
defaultEmbedColor Int @default(0) | ||
successEmbedColor Int @default(0) | ||
errorEmbedColor Int @default(0) | ||
modRoleIDs String[] @default([]) | ||
} | ||
|
||
//=================================================================== | ||
// Guild Support Ticket | ||
//=================================================================== | ||
model GuildTicketConfig { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String @unique | ||
channelNameFormat String @default("ticket-{number}") | ||
} | ||
|
||
model GuildTicketPanel { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
name String | ||
guildID String | ||
logChannelID String? | ||
categoryID String? | ||
supportRoleIDs String[] @default([]) | ||
claimRoleIDs String[] @default([]) | ||
pingRoleID String? | ||
questions String[] @default([]) | ||
emoji String @default("✉️") | ||
btnLabel String @default("Create Ticket") | ||
GuildTicket GuildTicket[] | ||
} | ||
|
||
model GuildTicket { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String | ||
ticketChannelID String | ||
createdMemberID String | ||
createdMemberUsername String @default("") | ||
controlMessageID String @default("") | ||
claimedMemberID String? | ||
panelID String @db.ObjectId | ||
status String @default("open") | ||
panel GuildTicketPanel @relation(fields: [panelID], references: [id], onDelete: Cascade) | ||
GuildTicketMember GuildTicketMember[] | ||
createdAt DateTime @default(now()) | ||
@@unique([guildID, ticketChannelID]) | ||
} | ||
|
||
model GuildTicketMember { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
ticketID String @db.ObjectId | ||
memberID String | ||
memberUsername String @default("") | ||
ticket GuildTicket @relation(fields: [ticketID], references: [id], onDelete: Cascade) | ||
@@unique([ticketID, memberID]) | ||
} | ||
|
||
model GuildTicketBlacklist { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String | ||
userID String | ||
@@unique([guildID, userID]) | ||
} | ||
|
||
//=================================================================== | ||
// Self-Role Module | ||
//=================================================================== | ||
model GuildSelfRolePanel { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
name String | ||
guildID String | ||
giveRoleIDs String[] @default([]) | ||
buttonLabel String | ||
buttonEmoji String | ||
@@unique([guildID, name]) | ||
} | ||
|
||
//=================================================================== | ||
// Report module | ||
//=================================================================== | ||
model GuildReportPanel { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String @unique | ||
channelID String? | ||
accessRoleIDs String[] @default([]) | ||
} | ||
|
||
model GuildReport { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String | ||
createdMemberID String | ||
createdMemberUsername String | ||
reportedMemberID String | ||
reportedMemberUsername String | ||
reason String | ||
status String @default("open") | ||
createdAt DateTime @default(now()) | ||
} | ||
|
||
//=================================================================== | ||
// Word Blacklist Module | ||
//=================================================================== | ||
model GuildWordBlacklistPanel { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String @unique | ||
minorTimeoutSeconds Int @default(0) | ||
majorTimeoutSeconds Int @default(0) | ||
} | ||
|
||
model GuildWordBlacklist { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String | ||
word String | ||
type String | ||
@@unique([guildID, word]) | ||
} | ||
|
||
//=================================================================== | ||
// TempBan Module | ||
//=================================================================== | ||
model GuildTempBan { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String | ||
userID String | ||
username String | ||
createdAt DateTime @default(now()) | ||
expiresAt DateTime | ||
} | ||
|
||
//=================================================================== | ||
// URL/IP Whitelist Module | ||
//=================================================================== | ||
model GuildUrlIpWhitelistPanel { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String @unique | ||
timeoutSeconds Int @default(0) | ||
} | ||
|
||
model GuildUrlIpWhitelist { | ||
id String @id @default(auto()) @map("_id") @db.ObjectId | ||
guildID String | ||
entry String | ||
type String | ||
@@unique([guildID, entry]) | ||
} |
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,27 @@ | ||
# Token of your Discord bot from https://discord.com/developers/applications | ||
TOKEN: "" | ||
|
||
# This is the activity type of bot (status) and can be one of the following, | ||
# PLAYING 0 | ||
# STREAMING 1 | ||
# LISTENING 2 | ||
# WATCHING 3 | ||
# COMPETING 5 | ||
ACTIVITY TYPE: 3 | ||
|
||
# This is the name of the activity that can be seen right next to activity type. | ||
# You can use any text you want here. | ||
ACTIVITY NAME: "systems" | ||
|
||
# Online, offline and other states bot can have. This can be one of the following, | ||
# online | ||
# idle | ||
# dnd | ||
STATUS: "online" | ||
|
||
# Guild used for slash command testing. | ||
# This is only for development and you can safely ignore this option. | ||
TEST GUILD ID: "1066351250410577960" | ||
|
||
# If the bot is running in production mode or not. Set to "false" for testing | ||
PRODUCTION: true |
Oops, something went wrong.