Replaced legacy Union[] with new syntax
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Dict, Any, Union
|
||||
from typing import Dict, Any
|
||||
|
||||
from discord import Member, Message, TextChannel
|
||||
from discord import utils as ds_utils
|
||||
@@ -33,11 +33,11 @@ class Logger(commands.Cog):
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_member_join(self, member: Member) -> None:
|
||||
welcome_chan: Union[TextChannel, None] = ds_utils.get(
|
||||
welcome_chan: TextChannel | None = ds_utils.get(
|
||||
self.client.get_guild(await config_get("guild")).channels,
|
||||
id=await config_get("welcome", "channels", "text"),
|
||||
)
|
||||
rules_chan: Union[TextChannel, None] = ds_utils.get(
|
||||
rules_chan: TextChannel | None = ds_utils.get(
|
||||
self.client.get_guild(await config_get("guild")).channels,
|
||||
id=await config_get("rules", "channels", "text"),
|
||||
)
|
||||
|
Reference in New Issue
Block a user