diff --git a/discord/enums.py b/discord/enums.py index 4733bf25b..0b8c58b09 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -46,6 +46,7 @@ class MessageType(Enum): channel_name_change = 4 channel_icon_change = 5 pins_add = 6 + new_member = 7 class GuildRegion(Enum): us_west = 'us-west' diff --git a/discord/message.py b/discord/message.py index 95519996a..4703c1ddd 100644 --- a/discord/message.py +++ b/discord/message.py @@ -365,6 +365,34 @@ class Message: if self.type is MessageType.channel_icon_change: return '{0.author.name} changed the channel icon.'.format(self) + if self.type is MessageType.new_member: + formats = [ + "%s just joined the server - glhf!", + "%s just joined. Everyone, look busy!", + "%s just joined. Can I get a heal?", + "%s joined your party.", + "%s joined. You must construct additional pylons.", + "Ermagherd. %s is here.", + "Welcome, %s. Stay awhile and listen.", + "Welcome, %s. We were expecting you ( ͡° ͜ʖ ͡°)", + "Welcome, %s. We hope you brought pizza.", + "Welcome %s. Leave your weapons by the door.", + "A wild %s appeared.", + "Swoooosh. %s just landed.", + "Brace yourselves. %s just joined the server.", + "%s just joined. Hide your bananas.", + "%s just arrived. Seems OP - please nerf.", + "%s just slid into the server.", + "A %s has spawned in the server.", + "Big %s showed up!", + "Where’s %s? In the server!", + "%s hopped into the server. Kangaroo!!", + "%s just showed up. Hold my beer.", + ] + + index = int(self.created_at.timestamp()) % len(formats) + return formats[index] % self.author.name + if self.type is MessageType.call: # we're at the call message type now, which is a bit more complicated. # we can make the assumption that Message.channel is a PrivateChannel