kurisu.py: Fix reference to specific channels and roles
@@ -178,30 +178,9 @@ class Kurisu(commands.Bot):
'hardware': None,
}
- self.assistance_channels = (
- self.channels['3ds-assistance-1'],
- self.channels['3ds-assistance-2'],
- self.channels['wiiu-assistance'],
- self.channels['switch-assistance-1'],
- self.channels['switch-assistance-2'],
- self.channels['hacking-general'],
- self.channels['legacy-systems'],
- self.channels['tech-talk'],
- self.channels['hardware'],
- )
-
- self.staff_roles = {'Owner': self.roles['Owner'],
- 'SuperOP': self.roles['SuperOP'],
- 'OP': self.roles['OP'],
- 'HalfOP': self.roles['HalfOP'],
- 'Staff': self.roles['Staff'],
- }
-
- self.helper_roles = {"3DS": self.roles['On-Duty 3DS'],
- "WiiU": self.roles['On-Duty Wii U'],
- "Switch": self.roles['On-Duty Switch'],
- "Legacy": self.roles['On-Duty Legacy']
- }
+ self.helper_roles: dict[str, discord.Role] = {}
+ self.assistance_channels: tuple[discord.TextChannel] = tuple()
+ self.staff_roles: dict[str, discord.Role] = {}
self.failed_cogs = []
self.channels_not_found = []
@@ -240,6 +219,31 @@ class Kurisu(commands.Bot):
await self.load_channels()
await self.load_roles()
+ self.helper_roles = {"3DS": self.roles['On-Duty 3DS'],
+ "WiiU": self.roles['On-Duty Wii U'],
+ "Switch": self.roles['On-Duty Switch'],
+ "Legacy": self.roles['On-Duty Legacy']
+ }
+
+ self.assistance_channels = (
+ self.channels['3ds-assistance-1'],
+ self.channels['3ds-assistance-2'],
+ self.channels['wiiu-assistance'],
+ self.channels['switch-assistance-1'],
+ self.channels['switch-assistance-2'],
+ self.channels['hacking-general'],
+ self.channels['legacy-systems'],
+ self.channels['tech-talk'],
+ self.channels['hardware'],
+ )
+
+ self.staff_roles = {'Owner': self.roles['Owner'],
+ 'SuperOP': self.roles['SuperOP'],
+ 'OP': self.roles['OP'],
+ 'HalfOP': self.roles['HalfOP'],
+ 'Staff': self.roles['Staff'],
+ }
+
self.err_channel = self.channels['bot-err']
startup_message = f'{self.user.name} has started! {self.guild} has {self.guild.member_count:,} members!'
