Skip to content

Commit b18e896

Browse files
committed
Remove hard coded channel id
1 parent 16c2826 commit b18e896

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ GENERAL_CHANNEL_ID=123
33
DISCORD_TOKEN=123
44
CALENDAR_URL=abc
55
NOTES_LINK=abc
6+
SCHEDULED_EVENT_CHANNEL_ID=123

src/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
CORE_DEVS_CHANNEL_ID = int(os.environ["CORE_DEVS_CHANNEL_ID"])
88
GENERAL_CHANNEL_ID = int(os.environ["GENERAL_CHANNEL_ID"])
9+
SCHEDULED_EVENT_CHANNEL_ID = int(os.environ["SCHEDULED_EVENT_CHANNEL_ID"])
910
DISCORD_TOKEN = os.environ["DISCORD_TOKEN"]
1011
CALENDAR_URL = os.environ["CALENDAR_URL"]
1112
NOTES_LINK = os.environ["NOTES_LINK"]

src/meeting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from nextcord import ScheduledEventEntityType
55

66
from .calendar import get_next_meeting
7-
from .config import CORE_DEVS_CHANNEL_ID, NOTES_LINK
7+
from .config import CORE_DEVS_CHANNEL_ID, NOTES_LINK, SCHEDULED_EVENT_CHANNEL_ID
88
from .database import (
99
add_notification_for_date,
1010
add_scheduled_event_for_date,
@@ -18,7 +18,7 @@ async def add_schedule_event(next_meeting: ics.Event, guild: nextcord.Guild):
1818
scheduled_event = get_scheduled_event_for_date(next_meeting.begin.isoformat())
1919

2020
if not scheduled_event:
21-
event_channel = guild.get_channel(928750531906789480)
21+
event_channel = guild.get_channel(SCHEDULED_EVENT_CHANNEL_ID)
2222
assert isinstance(event_channel, nextcord.channel.VoiceChannel)
2323

2424
event = await guild.create_scheduled_event(

0 commit comments

Comments
 (0)