Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev -> main #526

Merged
merged 3 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 0 additions & 110 deletions .github/workflows/discord-test-bot-deploy.yml

This file was deleted.

108 changes: 0 additions & 108 deletions .github/workflows/twitch-test-bot-deploy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion apps/discord-bot/internal/command/settwitch.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func SetTwitchCommandMetadata() *discordgo.ApplicationCommand {
// set-twitch announcement category-filter
{
Name: "category-filter",
Description: "Filtering Discord channel-specific Twitch stream category for announcement (case-sensitive). Just Chatting",
Description: "Discord channel-specific Twitch stream category for announcement (case-sensitive). Just Chatting",
DescriptionLocalizations: map[discordgo.Locale]string{
discordgo.Turkish: "Discord kanalına özgü yayın duyurularının filtrelenmesi (büyük/küçük harf duyarlı). Just Chatting",
},
Expand Down
4 changes: 3 additions & 1 deletion apps/discord-bot/internal/handler/guildcreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import (
func (h *handler) GuildCreate() {
ctx := context.Background()
h.discordClient.AddHandler(func(s *discordgo.Session, g *discordgo.GuildCreate) {
log.Println("[handler.GuildCreate] Adding the guild `" + g.Name + "` (ID: " + g.ID + ") to the database")
err := h.service.AddServerToDB(ctx, g.ID, g.Name, g.OwnerID)
if err != nil {
log.Println("[GuildCreate] AddServerToDB error:", err.Error())
log.Println("[handler.GuildCreate] AddServerToDB error:", err.Error())
}
log.Println("[handler.GuildCreate] Initiate Twitch live streaming checks for the guild `" + g.Name + "` (ID: " + g.ID + ")")
streamer.StartCheckLiveStreams(s, ctx, h.service, g.ID)
})
}
5 changes: 3 additions & 2 deletions apps/discord-bot/internal/handler/guilddelete.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ import (
func (h *handler) GuildDelete() {
ctx := context.Background()
h.discordClient.AddHandler(func(s *discordgo.Session, g *discordgo.GuildDelete) {
log.Println("[handler.GuildDelete] Delete records for the guild `" + g.Name + "` (ID: " + g.ID + ")")
err := h.service.DeleteServerFromDB(ctx, g.ID)
if err != nil {
log.Println("[GuildDelete] DeleteServerFromDB error:", err.Error())
log.Println("[handler.GuildDelete] DeleteServerFromDB error:", err.Error())
}
streamer.StopCheckLiveStreams(g.ID)
streamer.DeleteServerFromData(g.ID)
_, err = h.service.DeleteDiscordTwitchLiveAnnosByGuildId(ctx, g.ID)
if err != nil {
log.Println("[GuildDelete] DeleteDiscordTwitchLiveAnnosByGuildId error:", err.Error())
log.Println("[handler.GuildDelete] DeleteDiscordTwitchLiveAnnosByGuildId error:", err.Error())
}
})
}
Loading