Skip to content

Commit 685b77a

Browse files
authored
Deprecate creating a guild (#3348)
1 parent 8971d23 commit 685b77a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/http/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ impl Http {
661661
/// [documentation on this endpoint]:
662662
/// https://discord.com/developers/docs/resources/guild#create-guild
663663
/// [whitelist]: https://discord.com/developers/docs/resources/guild#create-guild
664+
#[deprecated = "This endpoint has been deprecated by Discord and will stop functioning after July 15, 2025. For more information, see: https://discord.com/developers/docs/change-log#deprecating-guild-creation-by-apps"]
664665
pub async fn create_guild(&self, map: &Value) -> Result<PartialGuild> {
665666
self.fire(Request {
666667
body: Some(to_vec(map)?),

src/model/guild/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ impl Guild {
665665
///
666666
/// [`Shard`]: crate::gateway::Shard
667667
/// [whitelist]: https://discord.com/developers/docs/resources/guild#create-guild
668+
#[deprecated = "This endpoint has been deprecated by Discord and will stop functioning after July 15, 2025. For more information, see: https://discord.com/developers/docs/change-log#deprecating-guild-creation-by-apps"]
668669
pub async fn create(
669670
http: impl AsRef<Http>,
670671
name: &str,
@@ -675,6 +676,7 @@ impl Guild {
675676
"name": name,
676677
});
677678

679+
#[allow(deprecated)]
678680
http.as_ref().create_guild(&map).await
679681
}
680682

0 commit comments

Comments
 (0)