fix ping
This commit is contained in:
parent
3fb2883091
commit
8f70e1567c
2 changed files with 5 additions and 2 deletions
1
db.ts
1
db.ts
|
@ -1,4 +1,3 @@
|
||||||
// db.ts
|
|
||||||
import { sql as pgsql } from "bun";
|
import { sql as pgsql } from "bun";
|
||||||
import { Database as SQLiteDB } from "bun:sqlite";
|
import { Database as SQLiteDB } from "bun:sqlite";
|
||||||
|
|
||||||
|
|
6
index.ts
6
index.ts
|
@ -11,7 +11,11 @@ client.once(Events.ClientReady, (c) => {
|
||||||
|
|
||||||
client.on(Events.MessageCreate, async (message) => {
|
client.on(Events.MessageCreate, async (message) => {
|
||||||
if (message.author.bot) return;
|
if (message.author.bot) return;
|
||||||
if (client.user && message.mentions.has(client.user)) {
|
if (
|
||||||
|
client.user &&
|
||||||
|
message.mentions.has(client.user) &&
|
||||||
|
!message.mentions.everyone
|
||||||
|
) {
|
||||||
let files = await db.all<StereoFile[]>`SELECT * FROM files WHERE owner = ${message.author.id}`;
|
let files = await db.all<StereoFile[]>`SELECT * FROM files WHERE owner = ${message.author.id}`;
|
||||||
let totalSize = files.reduce((a, b) => a + b.size, 0);
|
let totalSize = files.reduce((a, b) => a + b.size, 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue