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

Method create_plugin

components/stores/src/config.rs:741–804  ·  view source on GitHub ↗
(&self, create_plugin: CreatePlugin)

Source from the content-addressed store, hash-verified

739 }
740
741 pub async fn create_plugin(&self, create_plugin: CreatePlugin) -> ConfigStoreResult<Plugin> {
742 let res = sqlx::query_as!(
743 DbPlugin,
744 r#"INSERT INTO plugins (
745 created_at,
746 name,
747 short_description,
748 long_description,
749 is_published,
750 is_official,
751 plugin_kind,
752 current_version_number,
753 script_published_source,
754 script_published_version_updated_at,
755 script_dev_source,
756 script_dev_version_updated_at,
757 author_id,
758 is_public
759) VALUES (
760 now(), -- created_at
761 $1, -- name
762 $2, -- short_description
763 $3, -- long_description
764 false, -- is_published
765 $4, -- is_official
766 $5, -- plugin_kind
767 0, -- current_version_number
768 null, -- script_published_source
769 null, -- script_published_version_updated_at
770 null, -- script_dev_source
771 null, -- script_dev_version_updated_at
772 $6, -- author_id
773 $7 -- is_public
774) RETURNING id,
775created_at,
776name,
777short_description,
778long_description,
779is_published,
780is_official,
781plugin_kind,
782current_version_number,
783script_published_source,
784script_published_version_updated_at,
785script_dev_source,
786script_dev_version_updated_at,
787author_id,
788is_public,
789discord_thread_id,
790installed_guilds,
791installed_guilds_updated_at"#,
792 create_plugin.name,
793 create_plugin.short_description,
794 create_plugin.long_description,
795 create_plugin.is_official,
796 create_plugin.kind as i16,
797 create_plugin.author_id as i64,
798 create_plugin.is_public,

Callers 1

create_pluginFunction · 0.80

Calls 1

PluginAndImagesClass · 0.85

Tested by

no test coverage detected