remove unused imports
All checks were successful
release-tag / release-image (push) Successful in 23s
All checks were successful
release-tag / release-image (push) Successful in 23s
This commit is contained in:
parent
0341a70746
commit
50d8d9347c
@ -1,9 +1,6 @@
|
|||||||
import { Commands, type CommandsType } from "commands";
|
import { Commands, type CommandsType } from "commands";
|
||||||
import {
|
import {
|
||||||
ChannelType,
|
ChannelType,
|
||||||
Client,
|
|
||||||
Events,
|
|
||||||
IntentsBitField,
|
|
||||||
type ButtonInteraction,
|
type ButtonInteraction,
|
||||||
type CacheType,
|
type CacheType,
|
||||||
type ChatInputCommandInteraction,
|
type ChatInputCommandInteraction,
|
||||||
@ -13,7 +10,6 @@ import {
|
|||||||
import client from "lib/client";
|
import client from "lib/client";
|
||||||
import EventEmitter from "node:events";
|
import EventEmitter from "node:events";
|
||||||
import DiscordService from "services/discord.service";
|
import DiscordService from "services/discord.service";
|
||||||
import config from "config";
|
|
||||||
import { WaterMeService } from "actions/waterMe/waterMe.service";
|
import { WaterMeService } from "actions/waterMe/waterMe.service";
|
||||||
import { MedicationService } from "actions/medication/medication.service";
|
import { MedicationService } from "actions/medication/medication.service";
|
||||||
import { HelpService } from "actions/help/help.service";
|
import { HelpService } from "actions/help/help.service";
|
||||||
@ -52,9 +48,8 @@ export default class DiscordController extends EventEmitter {
|
|||||||
client.on("interactionCreate", this.handleInteraction.bind(this));
|
client.on("interactionCreate", this.handleInteraction.bind(this));
|
||||||
|
|
||||||
client.on("messageCreate", async (message) => {
|
client.on("messageCreate", async (message) => {
|
||||||
console.log(message.id)
|
console.log(message.id);
|
||||||
if (message.channel.type === ChannelType.DM
|
if (message.channel.type === ChannelType.DM) {
|
||||||
) {
|
|
||||||
console.log("got msg");
|
console.log("got msg");
|
||||||
this.dmService.forward(message);
|
this.dmService.forward(message);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import { TimestampStyles } from "discord.js";
|
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
||||||
import { timestamp } from "drizzle-orm/mysql-core";
|
|
||||||
import { integer, int, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
||||||
|
|
||||||
export const usersTable = sqliteTable("users_table", {
|
export const usersTable = sqliteTable("users_table", {
|
||||||
id: integer().primaryKey({ autoIncrement: true }),
|
id: integer().primaryKey({ autoIncrement: true }),
|
||||||
name: text().notNull(),
|
name: text().notNull(),
|
||||||
discord_id: integer().notNull().unique(),
|
discord_id: integer().notNull().unique(),
|
||||||
join_streak: integer(),
|
join_streak: integer(),
|
||||||
last_joined_at: integer({ mode: "timestamp" }),
|
last_joined_at: integer({ mode: "timestamp" }),
|
||||||
took_medication_today: integer().notNull().default(0),
|
took_medication_today: integer().notNull().default(0),
|
||||||
});
|
});
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
import config from "config";
|
import config from "config";
|
||||||
import { Client, GatewayIntentBits, Partials, ChannelType, Events, IntentsBitField } from "discord.js";
|
import {
|
||||||
|
Client,
|
||||||
|
GatewayIntentBits,
|
||||||
|
Partials,
|
||||||
|
IntentsBitField,
|
||||||
|
} from "discord.js";
|
||||||
|
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
intents: [IntentsBitField.Flags.Guilds,
|
intents: [
|
||||||
IntentsBitField.Flags.GuildMembers,
|
IntentsBitField.Flags.Guilds,
|
||||||
IntentsBitField.Flags.GuildModeration,
|
IntentsBitField.Flags.GuildMembers,
|
||||||
IntentsBitField.Flags.GuildMessages,
|
IntentsBitField.Flags.GuildModeration,
|
||||||
IntentsBitField.Flags.GuildMessageReactions,
|
IntentsBitField.Flags.GuildMessages,
|
||||||
IntentsBitField.Flags.GuildMessagePolls,
|
IntentsBitField.Flags.GuildMessageReactions,
|
||||||
IntentsBitField.Flags.MessageContent,
|
IntentsBitField.Flags.GuildMessagePolls,
|
||||||
IntentsBitField.Flags.DirectMessages,
|
IntentsBitField.Flags.MessageContent,
|
||||||
IntentsBitField.Flags.DirectMessageReactions,
|
IntentsBitField.Flags.DirectMessages,
|
||||||
IntentsBitField.Flags.DirectMessageTyping,
|
IntentsBitField.Flags.DirectMessageReactions,
|
||||||
IntentsBitField.Flags.DirectMessagePolls,
|
IntentsBitField.Flags.DirectMessageTyping,
|
||||||
GatewayIntentBits.DirectMessages,
|
IntentsBitField.Flags.DirectMessagePolls,
|
||||||
GatewayIntentBits.MessageContent],
|
GatewayIntentBits.DirectMessages,
|
||||||
partials: [Partials.Channel, Partials.Message]
|
GatewayIntentBits.MessageContent,
|
||||||
|
],
|
||||||
|
partials: [Partials.Channel, Partials.Message],
|
||||||
});
|
});
|
||||||
|
|
||||||
await client.login(config.discord.token);
|
await client.login(config.discord.token);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user