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

Method get_published_public_plugins

components/stores/src/config.rs:1113–1147  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1111 }
1112
1113 pub async fn get_published_public_plugins(&self) -> ConfigStoreResult<Vec<Plugin>> {
1114 let raw_plugins = sqlx::query_as!(
1115 DbPlugin,
1116 r#"SELECT id,
1117created_at,
1118name,
1119short_description,
1120long_description,
1121is_published,
1122is_official,
1123plugin_kind,
1124current_version_number,
1125script_published_source,
1126script_published_version_updated_at,
1127script_dev_source,
1128script_dev_version_updated_at,
1129author_id,
1130is_public,
1131discord_thread_id,
1132installed_guilds,
1133installed_guilds_updated_at
1134FROM plugins WHERE is_published = true AND is_public = true
1135ORDER BY id ASC"#,
1136 )
1137 .fetch_all(&self.pool)
1138 .await?;
1139
1140 let mut res: Vec<Plugin> = Vec::new();
1141 for plugin in raw_plugins.into_iter() {
1142 let images = self.get_plugin_images_with_pool(plugin.id as u64).await?;
1143 res.push(PluginAndImages(plugin, images).into());
1144 }
1145
1146 Ok(res)
1147 }
1148
1149 pub async fn try_guild_add_script_plugin(
1150 &self,

Callers 1

Calls 2

PluginAndImagesClass · 0.85

Tested by

no test coverage detected