Merge branch 'dev' into 'main'
feat: ⚰️ remove unused code
See merge request zyner/xyter/bot!3
This commit is contained in:
commit
533b277d2b
4 changed files with 3 additions and 23 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "xyter",
|
"name": "xyter",
|
||||||
"version": "2.6.0",
|
"version": "2.7.0-dev.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "xyter",
|
"name": "xyter",
|
||||||
"version": "2.6.0",
|
"version": "2.7.0-dev.1",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@prisma/client": "^4.7.1",
|
"@prisma/client": "^4.7.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "xyter",
|
"name": "xyter",
|
||||||
"version": "2.6.0",
|
"version": "2.7.0-dev.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A multi purpose Discord bot written in TypeScript with Discord.js",
|
"description": "A multi purpose Discord bot written in TypeScript with Discord.js",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import { Guild, Interaction } from "discord.js";
|
|
||||||
|
|
||||||
export default function ensureGuildExists(interaction: Interaction): Guild {
|
|
||||||
if (!interaction.guild) {
|
|
||||||
throw new Error(
|
|
||||||
"Oops! It looks like you're not part of a guild. Join a guild to embark on this adventure!"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return interaction.guild;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
import { Interaction, User } from "discord.js";
|
|
||||||
|
|
||||||
export default function ensureUserExists(interaction: Interaction): User {
|
|
||||||
if (!interaction.user) {
|
|
||||||
throw new Error(
|
|
||||||
"Oops! We couldn't find your user information. Please try again or contact support for assistance."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return interaction.user;
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue