-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Moonded/v2
V2
- Loading branch information
Showing
35 changed files
with
645 additions
and
234 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 |
---|---|---|
|
@@ -14,4 +14,5 @@ data/scannedUsers.json | |
.vscode/settings.json | ||
env/bot.env | ||
|
||
keys/ | ||
keys/ | ||
eng.traineddata |
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,35 @@ | ||
import { SlashCommandBuilder } from "discord.js"; | ||
import { command } from "utils"; | ||
|
||
const meta = new SlashCommandBuilder() | ||
.setName("authnext") | ||
.setDescription("dev"); | ||
|
||
export default command(meta, async ({ interaction }) => { | ||
const body = { | ||
username: interaction.user.username, | ||
connections: [ | ||
{ | ||
service: "discord", | ||
username: interaction.user.username, | ||
serviceid: interaction.user.id, | ||
}, | ||
], | ||
}; | ||
|
||
const data = await fetch(process.env.API_ENDPOINT_NEXT + "/dev/user", { | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
body: JSON.stringify(body), | ||
}); | ||
|
||
const returned = await data.json(); | ||
|
||
if (!returned) { | ||
return await interaction.reply({ content: "Error!", ephemeral: true }); | ||
} | ||
|
||
return await interaction.reply({ content: "Authed!", ephemeral: true }); | ||
}); |
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,4 +1,5 @@ | ||
import { category } from 'utils'; | ||
import respond from './respond'; | ||
import trivia from './trivia'; | ||
|
||
export default category('funny', [respond]); | ||
export default category('funny', [respond, trivia]); |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { SlashCommandBuilder, EmbedBuilder } from "discord.js"; | ||
import { command } from "utils"; | ||
|
||
const meta = new SlashCommandBuilder() | ||
.setName("discord") | ||
.setDescription("Send the Discord invite link via DM"); | ||
|
||
export default command(meta, async ({ interaction }) => { | ||
const text = | ||
"Cyberpunk 2077 Modding Discord: https://discord.gg/redmodding\nOfficial Test Server: https://discord.gg/BmqHtRFBxg"; | ||
|
||
await interaction.user.send(text); | ||
return await interaction.reply("Send! Check your DMs!"); | ||
}); |
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,39 @@ | ||
import { SlashCommandBuilder } from "discord.js"; | ||
import { command } from "utils"; | ||
|
||
const meta = new SlashCommandBuilder() | ||
.setName("reminder") | ||
.addStringOption((option) => | ||
option | ||
.setName("message") | ||
.setDescription("The message to remind you about") | ||
.setRequired(true) | ||
) | ||
.addNumberOption((option) => | ||
option | ||
.setName("time") | ||
.setDescription("The time in minutes to remind you") | ||
.setRequired(true) | ||
) | ||
.setDescription("Reminder Function, works if the bot is online and hasn't restarted/crashed"); | ||
|
||
export default command(meta, async ({ interaction }) => { | ||
const message = interaction.options.getString("message") || "No message provided"; | ||
const time = interaction.options.getNumber("time") || 0; | ||
const channel = interaction.channel!; | ||
const author = interaction.user!; | ||
|
||
if(message.length > 1000) { | ||
return interaction.reply({ content: "Message must be less than 1000 characters", ephemeral: true }); | ||
} | ||
|
||
if (!message) { | ||
return interaction.reply({ content: "No message provided", ephemeral: true }); | ||
} | ||
|
||
setTimeout(() => { | ||
channel.send({ content: `${author}\nReminder: ${message}` }); | ||
}, time * 60000); | ||
|
||
return interaction.reply({ content: `Reminder set for ${time} minutes`, ephemeral: true }); | ||
}); |
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,10 @@ | ||
import { SlashCommandBuilder } from "discord.js"; | ||
import { command } from "utils"; | ||
|
||
const meta = new SlashCommandBuilder() | ||
.setName("auth") | ||
.setDescription("Authenticates the user with the bot"); | ||
|
||
export default command(meta, async ({ interaction }) => { | ||
return await interaction.reply("Send!"); | ||
}); |
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,9 +1,17 @@ | ||
import { category } from "utils"; | ||
import who from "./who"; | ||
import link from "./link"; | ||
// import link from "./link"; | ||
import create from "./create"; | ||
import update from "./update"; | ||
import pass from "./pass"; | ||
import sync from "./sync"; | ||
import linkv2 from "./linkv2"; | ||
import auth from "./auth"; | ||
import keys from "./keys"; | ||
|
||
export default category("Team", [who, link, create, pass, sync]); | ||
export default category("Team", [ | ||
who, | ||
create, | ||
sync, | ||
linkv2, | ||
auth, | ||
keys, | ||
]); |
Oops, something went wrong.