aboutsummaryrefslogtreecommitdiff
path: root/src/constants.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-10 20:25:32 -0700
committerAustin Hellyer <[email protected]>2016-12-29 11:55:10 -0800
commit0359f512a8aada5ae0371049eb7c66ecd8d68d84 (patch)
treef88dd9b362a2d349d0cdcd13b0859c4cc3329f46 /src/constants.rs
parentRework some event handles (diff)
downloadserenity-0359f512a8aada5ae0371049eb7c66ecd8d68d84.tar.xz
serenity-0359f512a8aada5ae0371049eb7c66ecd8d68d84.zip
Add guild and channel search
Diffstat (limited to 'src/constants.rs')
-rw-r--r--src/constants.rs92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/constants.rs b/src/constants.rs
index 50dd722..bb2589a 100644
--- a/src/constants.rs
+++ b/src/constants.rs
@@ -8,6 +8,98 @@ 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.rs, ", env!("CARGO_PKG_VERSION"), ")");
+#[allow(dead_code)]
+#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
+pub enum ErrorCode {
+ BotsCannotUse,
+ CannotSendEmptyMessage,
+ CannotSendMessagesInVoice,
+ CannotSendMessagesToUser,
+ ChannelVerificationTooHigh,
+ EditByOtherAuthor,
+ EmbedDisabled,
+ InvalidAccountType,
+ InvalidAuthToken,
+ InvalidBulkDeleteCount,
+ InvalidDMChannelAction,
+ InvalidOauthState,
+ InvalidPinChannel,
+ MaxFriendsReached,
+ MaxGuildsReached,
+ MaxPinsReached,
+ MaxRolesReached,
+ MissingAccess,
+ MissingPermissions,
+ NoteTooLong,
+ Oauth2ApplicationLacksBot,
+ Oauth2ApplicationLimitReached,
+ OnlyBotsCanUse,
+ ReactionBlocked,
+ SearchIndexUnavailable,
+ TooManyReactions,
+ Unauthorized,
+ UnknownAccount,
+ UnknownApplication,
+ UnknownChannel,
+ UnknownGuild,
+ UnknownEmoji,
+ UnknownIntegration,
+ UnknownInvite,
+ UnknownMember,
+ UnknownMessage,
+ UnknownOverwrite,
+ UnknownProvider,
+ UnknownRole,
+ UnknownToken,
+ UnknownUser,
+}
+
+/*
+map_nums! { ErrorCode;
+ BotsCannotUse 20001,
+ CannotSendEmptyMessage 50006,
+ CannotSendMessagesInVoice 50008,
+ CannotSendMessagesToUser 50007,
+ ChannelVerificationTooHigh 50009,
+ EditByOtherAuthor 50005,
+ EmbedDisabled 50004,
+ InvalidAccountType 50002,
+ InvalidAuthToken 50014,
+ InvalidBulkDeleteCount 50016,
+ InvalidDMChannelAction 50003,
+ InvalidOauthState 50012,
+ InvalidPinChannel 50019,
+ MaxFriendsReached 30002,
+ MaxGuildsReached 30001,
+ MaxPinsReached 30003,
+ MaxRolesReached 30005,
+ MissingAccess 50001,
+ MissingPermissions 500013,
+ NoteTooLong 50015,
+ Oauth2ApplicationLacksBot 50010,
+ Oauth2ApplicationLimitReached 50011,
+ OnlyBotsCanUse 20002,
+ ReactionBlocked 90001,
+ SearchIndexUnavailable 110000,
+ TooManyReactions 30010,
+ Unauthorized 40001,
+ UnknownAccount 10001,
+ UnknownApplication 10002,
+ UnknownChannel 10003,
+ UnknownEmoji 10014,
+ UnknownGuild 10004,
+ UnknownIntegration 10005,
+ UnknownInvite 10006,
+ UnknownMember 10007,
+ UnknownMessage 10008,
+ UnknownOverwrite 10009,
+ UnknownProvider 10010,
+ UnknownRole 10011,
+ UnknownToken 10012,
+ UnknownUser 10013,
+}
+*/
+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum OpCode {
Event,