Skip to content

Commit 1d160cf

Browse files
committed
style: fix code and dates
1 parent 0403dcf commit 1d160cf

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/commands.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ const commands: Record<string, Command> = {
12251225
targetChannel &&
12261226
(targetChannel.type === ChannelType.GuildText ||
12271227
targetChannel.type === ChannelType.GuildAnnouncement)
1228-
)
1228+
) {
12291229
if (
12301230
!isDm &&
12311231
!interaction.memberPermissions?.has(
@@ -1241,6 +1241,7 @@ const commands: Record<string, Command> = {
12411241

12421242
return;
12431243
}
1244+
}
12441245

12451246
// Check the permissions of the bot in the channel
12461247
const botMember = isDm
@@ -1290,6 +1291,7 @@ const commands: Record<string, Command> = {
12901291
desiredState ? "enabled" : "disabled"
12911292
} in this channel!`,
12921293
});
1294+
12931295
return;
12941296
}
12951297

src/db/migratedb.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ async function migrate() {
4040

4141
for (const row of botInfo) {
4242
console.log(
43+
new Date(),
4344
`📋 Migrating bot info: guildsTotal=${row.totalServers ?? 0}, totalMembers=${row.totalMembers ?? 0}`,
4445
);
4546
await pgDb.insert(pgSchema.dbBotInfoTable).values({
@@ -54,7 +55,7 @@ async function migrate() {
5455
.from(sqliteSchema.sqliteDiscord);
5556

5657
for (const row of discordRows) {
57-
console.log("📋 Migrating discord guild:", row.guildId);
58+
console.log(new Date(), `📋 Migrating discord guild: ${row.guildId}`);
5859
await pgDb
5960
.insert(pgSchema.dbDiscordTable)
6061
.values({ guildId: row.guildId ?? "" })
@@ -69,6 +70,7 @@ async function migrate() {
6970

7071
if (!twitchChannelName) {
7172
console.log(
73+
new Date(),
7274
`⚠️ Skipping Twitch channel ID ${row.twitchChannelId} as it no longer exists.`,
7375
);
7476
continue;
@@ -88,6 +90,7 @@ async function migrate() {
8890
for (const row of youtubeRows) {
8991
if (!checkIfChannelIdIsValid(row.youtubeChannelId)) {
9092
console.log(
93+
new Date(),
9194
`⚠️ Skipping YouTube channel ID ${row.youtubeChannelId} as it is not a valid channel ID.`,
9295
);
9396
continue;
@@ -98,6 +101,10 @@ async function migrate() {
98101
// 5. Guild Subscriptions (after Twitch/YouTube exist!)
99102
for (const row of discordRows) {
100103
if (row.guildPlatform === "twitch") {
104+
console.log(
105+
new Date(),
106+
`📋 Migrating discord guild: ${row.guildId} for Twitch ${row.platformUserId}`,
107+
);
101108
await discordAddGuildTrackingUser(
102109
row.guildId,
103110
Platform.Twitch,
@@ -107,6 +114,10 @@ async function migrate() {
107114
false,
108115
);
109116
} else if (row.guildPlatform === "youtube") {
117+
console.log(
118+
new Date(),
119+
`📋 Migrating discord guild: ${row.guildId} for YouTube ${row.platformUserId}`,
120+
);
110121
await discordAddGuildTrackingUser(
111122
row.guildId,
112123
Platform.YouTube,

0 commit comments

Comments
 (0)