Skip to content
New issue

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

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

Already on GitHub? # to your account

Add help message in welcome #110

Merged
merged 2 commits into from
Mar 24, 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
5 changes: 4 additions & 1 deletion bot/extensions/welcome_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
class WelcomeCog(Cog, name="Welcome", description="Welcomes new members"):
"""A cog that sends a welcome message to new members when they join the server."""

WELCOME_MESSAGE = "Hi **{member_name}!** Welcome to the **Code Society**.\n\nBefore posting please:\n- Take a " \
WELCOME_MESSAGE = "Hi **{member_name}!** Welcome to the **Code Society**.\n\nIf you need help, use the <#{help_id}> channel " \
"and read the <#{guide_id}> before.\n\nBefore posting please:\n- Take a " \
"moment to read the <#{info_id}> and the <#{rules_id}>.\n- Choose some <#{roles_id}>.\n" \
"- Introduce yourself in <#{intro_id}>."

Expand All @@ -26,6 +27,8 @@ def get_welcome_message(self, member):

return self.WELCOME_MESSAGE.format(
member_name=member.mention,
help_id=Channel.get_by(channel_name="help").channel_id,
guide_id=Channel.get_by(channel_name="posting-guidelines").channel_id,
info_id=Channel.get_by(channel_name="info").channel_id,
rules_id=Channel.get_by(channel_name="rules").channel_id,
roles_id=Channel.get_by(channel_name="roles").channel_id,
Expand Down
4 changes: 3 additions & 1 deletion db/seeds/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ def seed_database():
"info": 825404191492276225,
"rules": 823183118902362132,
"welcome": 823178343943897091,
"moderation_logs": 876592591657918514
"moderation_logs": 876592591657918514,
"help": 1019793296740073614,
"posting-guidelines": 1068966762730750105
}

for channel_name in initial_channels:
Expand Down
Loading