Struct slashy::settings::Settings [−][src]
pub struct Settings { pub prefixes: Vec<&'static str>, pub auto_register: bool, pub auto_delete: bool, pub slash_command_guilds: Vec<GuildId>, }
Expand description
Represents the settings for the framework
Fields
prefixes: Vec<&'static str>
The prefixes the bot uses
auto_register: bool
Whether to auto-register commands as slash commands on Ready.
auto_delete: bool
Whether to auto-delete unrecognized slash commands on Ready.
slash_command_guilds: Vec<GuildId>
Guilds to register slash commands to.
Registers all commands to these guilds regardles of auto_register
.
Is useful for quick updates or if you have auto_register
off.
Trait Implementations
impl SettingsProvider for Settings
[src]
impl SettingsProvider for Settings
[src]fn default_prefixes(&self) -> Vec<String>
[src]
fn default_prefixes(&self) -> Vec<String>
[src]The default prefixes the bot should fallback to.
fn prefixes(&self, _guild_id: GuildId) -> Option<Vec<String>>
[src]
fn prefixes(&self, _guild_id: GuildId) -> Option<Vec<String>>
[src]The prefixes for a specific guild.
fn auto_register(&self) -> bool
[src]
fn auto_register(&self) -> bool
[src]Whether we should auto-register.
fn auto_delete(&self) -> bool
[src]
fn auto_delete(&self) -> bool
[src]Whether we should auto-delete non-existant commands.
fn auto_register_guilds(&self) -> Vec<GuildId>
[src]
fn auto_register_guilds(&self) -> Vec<GuildId>
[src]Guilds to register commands to.
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,