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

Method get_db_script_by_id

components/stores/src/config.rs:46–61  ·  view source on GitHub ↗
(
        &self,
        guild_id: Id<GuildMarker>,
        id: i64,
    )

Source from the content-addressed store, hash-verified

44 }
45
46 async fn get_db_script_by_id(
47 &self,
48 guild_id: Id<GuildMarker>,
49 id: i64,
50 ) -> ConfigStoreResult<DbScript> {
51 Ok(sqlx::query_as!(
52 DbScript,
53 "SELECT id, guild_id, name, original_source, enabled, plugin_id, plugin_auto_update, \
54 plugin_version_number, settings_values FROM guild_scripts WHERE guild_id = $1 AND id \
55 = $2;",
56 guild_id.get() as i64,
57 id
58 )
59 .fetch_one(&self.pool)
60 .await?)
61 }
62
63 pub async fn get_guild_script_count(
64 conn: &mut PgConnection,

Callers 1

get_script_by_idMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected