MCPcopy Create free account
hub / github.com/Botloader/botloader / fetch_plugin_author

Function fetch_plugin_author

components/webapi/src/routes/plugins.rs:354–370  ·  view source on GitHub ↗
(
    config: &DiscordConfig,
    logged_in_user: Option<&CurrentUser>,
    plugin: &Plugin,
)

Source from the content-addressed store, hash-verified

352}
353
354pub async fn fetch_plugin_author(
355 config: &DiscordConfig,
356 logged_in_user: Option<&CurrentUser>,
357 plugin: &Plugin,
358) -> ApiResult<PluginResponse> {
359 let user = fetch_discord_user(config, logged_in_user, plugin.author_id).await?;
360 let is_staff = config.owners.iter().any(|v| v.id == plugin.author_id);
361
362 Ok(PluginResponse {
363 plugin: plugin.clone(),
364 author: User {
365 inner: user,
366 is_bl_staff: is_staff,
367 is_bl_trusted: is_staff,
368 },
369 })
370}
371
372pub async fn fetch_plugin_authors(
373 config: &DiscordConfig,

Callers 1

get_pluginFunction · 0.85

Calls 1

fetch_discord_userFunction · 0.85

Tested by

no test coverage detected