aboutsummaryrefslogtreecommitdiff
path: root/src/constants.rs
diff options
context:
space:
mode:
authorillia k <[email protected]>2017-05-22 22:49:07 +0300
committerZeyla Hellyer <[email protected]>2017-05-22 12:49:07 -0700
commit8f88c6b0613199492ebca8cd9f2bf4dd5c97add7 (patch)
treeea2f86a016e8e6a4dc91f8b7492fcb716f946915 /src/constants.rs
parentAdd support for retrieving invites with counts (diff)
downloadserenity-8f88c6b0613199492ebca8cd9f2bf4dd5c97add7.tar.xz
serenity-8f88c6b0613199492ebca8cd9f2bf4dd5c97add7.zip
Handle message type 7 (member join)
When message type 7 is received from the gateway, transform the content if the type is 7 to a proper greeting. Additionally, when the type is 6, provide a proper content notifying that a user has pinned a message to the channel. These transformations are not done at REST-level when retrieving messages, and are instead done in `ChannelId::message` and `ChannelId::messages`.
Diffstat (limited to 'src/constants.rs')
-rw-r--r--src/constants.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/constants.rs b/src/constants.rs
index de670c9..5c98527 100644
--- a/src/constants.rs
+++ b/src/constants.rs
@@ -12,6 +12,32 @@ pub const MESSAGE_CODE_LIMIT: u16 = 2000;
/// [UserAgent]: ../hyper/header/struct.UserAgent.html
pub const USER_AGENT: &'static str = concat!("DiscordBot (https://github.com/zeyla/serenity, ", env!("CARGO_PKG_VERSION"), ")");
+/// List of messages Discord shows on member join.
+pub static JOIN_MESSAGES: &'static [&'static str] = &[
+ "$user just joined the server - glhf!",
+ "$user just joined. Everyone, look busy!",
+ "$user just joined. Can I get a heal?",
+ "$user joined your party.",
+ "$user joined. You must construct additional pylons.",
+ "Ermagherd. $user is here.",
+ "Welcome, $user. Stay awhile and listen.",
+ "Welcome, $user. We were expecting you ( ͡° ͜ʖ ͡°)",
+ "Welcome, $user. We hope you brought pizza.",
+ "Welcome $user. Leave your weapons by the door.",
+ "A wild $user appeared.",
+ "Swoooosh. $user just landed.",
+ "Brace yourselves. $user just joined the server.",
+ "$user just joined. Hide your bananas.",
+ "$user just arrived. Seems OP - please nerf.",
+ "$user just slid into the server.",
+ "A $user has spawned in the server.",
+ "Big $user showed up!",
+ "Where’s $user? In the server!",
+ "$user hopped into the server. Kangaroo!!",
+ "$user just showed up. Hold my beer."
+];
+
+
#[allow(dead_code)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ErrorCode {