okay, so apparently, committing your token with admin in nin0Corp is not a good idea.
This commit is contained in:
parent
86453daede
commit
cd08ed9ae4
6 changed files with 49 additions and 4 deletions
|
@ -1,14 +1,24 @@
|
|||
import DDBKit
|
||||
import DotEnv
|
||||
import Foundation
|
||||
|
||||
@main
|
||||
|
||||
struct FjAdminBot: DiscordBotApp {
|
||||
init() async {
|
||||
do {
|
||||
let env = try DotEnv.read(path: "./.env")
|
||||
env.load()
|
||||
print("Loaded .env file")
|
||||
} catch {
|
||||
print("Failed to load .env file, things won't work!")
|
||||
}
|
||||
|
||||
let httpClient = HTTPClient()
|
||||
bot = await BotGatewayManager(
|
||||
eventLoopGroup: httpClient.eventLoopGroup,
|
||||
httpClient: httpClient,
|
||||
token: "MTMxMTY2NTg1OTQ3NTAxMzY1Mg.GgVETf.KbMqaqPhOR3JMNT-GiWT3qwiK862cbbjZm9RTc",
|
||||
token: ProcessInfo.processInfo.environment["BOT_TOKEN"]!,
|
||||
largeThreshold: 250,
|
||||
presence: .init(activities: [], status: .online, afk: false),
|
||||
intents: [.messageContent, .guildMessages]
|
||||
|
@ -23,7 +33,7 @@ struct FjAdminBot: DiscordBotApp {
|
|||
|
||||
var body: [any BotScene] {
|
||||
ReadyEvent { ready in
|
||||
print("hi mom")
|
||||
print(String(format: "Logged on as %@#%@!", ready.user.username, ready.user.discriminator))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue