Compare commits

..

No commits in common. "3a20fe0b003b35f8396a77114b5ba72a1f19c867" and "b3de3b160a2e0afd1d6509204f7ea421ae94683c" have entirely different histories.

5 changed files with 9 additions and 53 deletions

View File

@ -1,5 +1,3 @@
const prisma = require("../clients/prisma");
const command = {
name: "join",
desc: "make the bot listen to a channel",
@ -20,21 +18,6 @@ const command = {
return;
}
const storeChannel = await prisma.channel.create({
data: {
name: msg.senderUsername,
},
});
if (!storeChannel) {
await client.say(
msg.channelName,
`${msg.displayName}, something went wrong saving`
);
return;
}
await client
.join(msg.senderUsername)
.then(
@ -43,14 +26,14 @@ const command = {
msg.channelName,
`${msg.displayName}, joined ${msg.senderUsername} BroBalt`
)
);
await client
.say(msg.senderUsername, "MrDestructoid")
.catch((err) =>
console.error(
`The bot can't speak in the newly joined channel! Error: ${err.message}`
)
)
.then(() => client.say(msg.senderUsername, "MrDestructoid"))
.catch(
async () =>
await client.say(
msg.channelName,
`${msg.displayName}, the bot is probably in your chat, but can't speak because of phone number etc verification`
)
);
},
};

View File

@ -17,7 +17,7 @@ const command = {
os.totalmem() / 1024 / 1024
)}mb Joined channels count: ${
client.joinedChannels.size
} Megis drinkers count: ${await prisma.megis.count()}`
} Megis drinkers count: ${await prisma.user.count()}`
);
},
};

View File

@ -1,14 +0,0 @@
const command = {
name: "repo",
desc: "get the git repo of bot",
restricted: false,
mod: false,
run: async (client, msg) => {
await client.say(
msg.channelName,
`${msg.displayName}, https://git.disroot.org/qwertyasdfgh/twitch_bot Author: juuuuuuuuuuuuunas`
);
},
};
module.exports = { command };

View File

@ -1,8 +0,0 @@
-- CreateTable
CREATE TABLE "Channel" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "Channel_name_key" ON "Channel"("name");

View File

@ -10,11 +10,6 @@ datasource db {
url = env("DATABASE_URL")
}
model Channel {
id String @id @default(uuid())
name String @unique
}
model User {
id String @id @default(uuid())
userId String @unique