package Ġcom . gitlab . k ord lib . rest . service Ċ Ċ import Ġcom . gitlab . k ord lib . common . entity . Discord Channel Ċ import Ġcom . gitlab . k ord lib . common . entity . Discord Guild Ċ import Ġcom . gitlab . k ord lib . common . entity . Discord Role Ċ import Ġcom . gitlab . k ord lib . rest . builder . ban . Ban Create Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . channel .* Ċ import Ġcom . gitlab . k ord lib . rest . builder . guild . Guild Create Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . guild . Guild Modify Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . integration . Integration Modify Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . member . Member Add Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . member . Member Modify Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . role . Role Create Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . role . Role Modify Builder Ċ import Ġcom . gitlab . k ord lib . rest . builder . role . Role Positions Modify Builder Ċ import Ġcom . gitlab . k ord lib . rest . json . request .* Ċ import Ġcom . gitlab . k ord lib . rest . request . RequestHandler Ċ import Ġcom . gitlab . k ord lib . rest . route . Position Ċ import Ġcom . gitlab . k ord lib . rest . route . Route Ċ import Ġkotlin . contracts . Experimental Contracts Ċ import Ġkotlin . contracts . Invocation Kind Ċ import Ġkotlin . contracts . contract Ċ Ċ class ĠGuild Service ( request Handler : ĠRequest Handler ) Ġ: ĠRest Service ( request Handler ) Ġ{ ĊĊĠĠĠ Ġ@ Opt In ( Experimental Contracts :: class ) ĊĠĠĠ Ġsuspend Ġinline Ġfun Ġcreate Guild ( builder : ĠGuild Create Builder . () Ġ-> ĠUnit ): ĠDiscord Guild Ġ{ ĊĠĠĠĠĠĠĠ Ġcontract Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcalls In Place ( builder , ĠInvocation Kind . EX ACT LY _ ON CE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġcall ( Route . Guild Post ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbody ( Guild CreateRequest . serializer (), ĠGuild Create Builder (). apply ( builder ). to Request ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* Ġ@ param Ġwith Counts Ġwhether Ġto Ġinclude Ġthe Ġ[ Discord Guild . approx imate Member Count ] ĊĠĠĠĠ Ġ* Ġand Ġ[ Discord Guild . approx imate Presence Count ] Ġfields , Ġ` false ` Ġby Ġdefault . ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġsuspend Ġfun Ġget Guild ( guild Id : ĠString , Ġwith Counts : ĠBoolean Ġ= Ġfalse ) Ġ= Ġcall ( Route . Guild Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġparameter (" with _ count ", Ġwith Counts . toString ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠReturns Ġthe Ġpreview Ġof Ġthis Ġ[ guild Id ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġsuspend Ġfun Ġget Guild Preview ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Preview Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Opt In ( Experimental Contracts :: class ) ĊĠĠĠ Ġsuspend Ġinline Ġfun Ġmodify Guild ( guild Id : ĠString , Ġbuilder : ĠGuild Modify Builder . () Ġ-> ĠUnit ): ĠDiscord Guild Ġ{ ĊĠĠĠĠĠĠĠ Ġcontract Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcalls In Place ( builder , ĠInvocation Kind . EX ACT LY _ ON CE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġcall ( Route . Guild Patch ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmodify Builder Ġ= ĠGuild Modify Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbody ( Guild Modify Request . serializer (), Ġmodify Builder . to Request ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodify Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Guild ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Delete ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Channels ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Channels Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġcreate Guild Channel ( guild Id : ĠString , Ġchannel : ĠGuild Create Channel Request , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild Channels Post ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġbody ( Guild Create Channel Request . serializer (), Ġchannel ) ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Opt In ( Experimental Contracts :: class ) ĊĠĠĠ Ġsuspend Ġinline Ġfun Ġmodify Guild Channel Position ( guild Id : ĠString , Ġbuilder : ĠGuild Channel Position Modify Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcontract Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcalls In Place ( builder , ĠInvocation Kind . EX ACT LY _ ON CE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcall ( Route . Guild Channels Patch ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmodify Builder Ġ= ĠGuild Channel Position Modify Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbody ( Guild Channel Position Modify Request . Serializer , Ġmodify Builder . to Request ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodify Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Member ( guild Id : ĠString , ĠuserId : ĠString ) Ġ= Ġcall ( Route . Guild Member Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Members ( guild Id : ĠString , Ġposition : ĠPosition ? Ġ= Ġnull , Ġlimit : ĠInt Ġ= Ġ 1 ) Ġ= Ġcall ( Route . Guild Members Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġif Ġ( position Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparameter ( position . key , Ġposition . value ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġparameter (" limit ", Ġ"$ limit ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġadd Guild Member ( guild Id : ĠString , ĠuserId : ĠString , Ġbuilder : ĠMember Add Builder . () Ġ-> ĠUnit ) Ġ= Ġcall ( Route . Guild Member Put ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠ Ġbody ( Guild Member Add Request . serializer (), ĠMember Add Builder (). also ( builder ). to Request ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Opt In ( Experimental Contracts :: class ) ĊĠĠĠ Ġsuspend Ġinline Ġfun Ġmodify Guild Member ( guild Id : ĠString , ĠuserId : ĠString , Ġbuilder : ĠMember Modify Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcontract Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcalls In Place ( builder , ĠInvocation Kind . EX ACT LY _ ON CE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcall ( Route . Guild Member Patch ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmodify Builder Ġ= ĠMember Modify Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbody ( Guild Member Modify Request . serializer (), Ġmodify Builder . to Request ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodify Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġadd Role To Guild Member ( guild Id : ĠString , ĠuserId : ĠString , Ġrole Id : ĠString , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild Member Role Put ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠ Ġkeys [ Route . RoleId ] Ġ= Ġrole Id ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Role From Guild Member ( guild Id : ĠString , ĠuserId : ĠString , Ġrole Id : ĠString , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild Member Role Delete ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠ Ġkeys [ Route . RoleId ] Ġ= Ġrole Id ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Guild Member ( guild Id : ĠString , ĠuserId : ĠString , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild Member Delete ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild B ans ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild B ans Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Ban ( guild Id : ĠString , ĠuserId : ĠString ) Ġ= Ġcall ( Route . Guild Ban Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Opt In ( Experimental Contracts :: class ) ĊĠĠĠ Ġsuspend Ġinline Ġfun Ġadd Guild Ban ( guild Id : ĠString , ĠuserId : ĠString , Ġbuilder : ĠB an Create Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcontract Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcalls In Place ( builder , ĠInvocation Kind . EX ACT LY _ ON CE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcall ( Route . Guild Ban Put ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcreate Builder Ġ= ĠB an Create Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbody ( Guild Ban Add Request . serializer (), Ġcreate Builder . to Request ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcreate Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Guild Ban ( guild Id : ĠString , ĠuserId : ĠString , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild Ban Delete ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . UserId ] Ġ= ĠuserId ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Roles ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Roles Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Opt In ( Experimental Contracts :: class ) ĊĠĠĠ Ġsuspend Ġinline Ġfun Ġcreate Guild Role ( guild Id : ĠString , Ġbuilder : ĠRole Create Builder . () Ġ-> ĠUnit Ġ= Ġ{} ): ĠDiscord Role Ġ{ ĊĠĠĠĠĠĠĠ Ġcontract Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcalls In Place ( builder , ĠInvocation Kind . EX ACT LY _ ON CE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġcall ( Route . Guild Role Post ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcreate Builder Ġ= ĠRole Create Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbody ( Guild Role CreateRequest . serializer (), Ġcreate Builder . to Request ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcreate Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġinline Ġfun Ġmodify Guild Role Position ( guild Id : ĠString , Ġbuilder : ĠRole Positions Modify Builder . () Ġ-> ĠUnit ) Ġ= Ġcall ( Route . Guild Roles Patch ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġval Ġmodify Builder Ġ= ĠRole Positions Modify Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠ Ġbody ( Guild Role Position Modify Request . Serializer , Ġmodify Builder . to Request ()) ĊĠĠĠĠĠĠĠ Ġmodify Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġinline Ġfun Ġmodify Guild Role ( guild Id : ĠString , Ġrole Id : ĠString , Ġbuilder : ĠRole Modify Builder . () Ġ-> ĠUnit ) Ġ= Ġcall ( Route . Guild Role Patch ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . RoleId ] Ġ= Ġrole Id ĊĠĠĠĠĠĠĠ Ġval Ġmodify Builder Ġ= ĠRole Modify Builder (). apply ( builder ) ĊĠĠĠĠĠĠĠ Ġbody ( Guild Role Modify Request . serializer (), Ġmodify Builder . to Request ()) ĊĠĠĠĠĠĠĠ Ġmodify Builder . reason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Guild Role ( guild Id : ĠString , Ġrole Id : ĠString , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild Role Delete ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . RoleId ] Ġ= Ġrole Id ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild P rune Count ( guild Id : ĠString , Ġdays : ĠInt Ġ= Ġ 7 ) Ġ= Ġcall ( Route . Guild P rune Count Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġparameter (" days ", Ġdays ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġbegin Guild P rune ( guild Id : ĠString , Ġdays : ĠInt Ġ= Ġ 7 , Ġcompute P rune Count : ĠBoolean Ġ= Ġtrue , Ġreason : ĠString ? Ġ= Ġnull ) Ġ= Ġcall ( Route . Guild P rune Post ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġparameter (" days ", Ġdays ) ĊĠĠĠĠĠĠĠ Ġparameter (" compute _ prune _ count ", Ġcompute P rune Count ) ĊĠĠĠĠĠĠĠ Ġreason ?. let Ġ{ Ġheader (" X - Audit - Log - Reason ", Ġit ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Voice Regions ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Voice Regions Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Inv ites ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Inv ites Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Integr ations ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Integration Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġcreate Guild Integration ( guild Id : ĠString , Ġintegration : ĠGuild Integration CreateRequest ) Ġ= Ġcall ( Route . Guild Integration Post ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġbody ( Guild Integration CreateRequest . serializer (), Ġintegration ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġinline Ġfun Ġmodify Guild Integration ( guild Id : ĠString , Ġintegration Id : ĠString , Ġbuilder : ĠIntegration Modify Builder . () Ġ-> ĠUnit ) Ġ= Ġcall ( Route . Guild Integration Patch ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Integration Id ] Ġ= Ġintegration Id ĊĠĠĠĠĠĠĠ Ġbody ( Guild Integration Modify Request . serializer (), ĠIntegration Modify Builder (). apply ( builder ). to Request ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Guild Integration ( guild Id : ĠString , Ġintegration Id : ĠString ) Ġ= Ġcall ( Route . Guild Integration Delete ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Integration Id ] Ġ= Ġintegration Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġsync Guild Integration ( guild Id : ĠString , Ġintegration Id : ĠString ) Ġ= Ġcall ( Route . Guild Integration Sync Post ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Integration Id ] Ġ= Ġintegration Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Guild Embed ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Embed Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġmodify Guild Embed ( guild Id : ĠString , Ġembed : ĠGuild Embed Modify Request ) Ġ= Ġcall ( Route . Guild Embed Patch ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġbody ( Guild Embed Modify Request . serializer (), Ġembed ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget Van ity Invite ( guild Id : ĠString ) Ġ= Ġcall ( Route . Guild Van ity Invite Get ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġmodify CurrentUser Nick name ( guild Id : ĠString , Ġnick : ĠCurrent User Nick name Modify Request ) Ġ= Ġcall ( Route . Guild CurrentUser Nick Patch ) Ġ{ ĊĠĠĠĠĠĠĠ Ġkeys [ Route . Guild Id ] Ġ= Ġguild Id ĊĠĠĠĠĠĠĠ Ġbody ( CurrentUser Nick name Modify Request . serializer (), Ġnick ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ suspend Ġinline Ġfun ĠGuild Service . createText Channel ( guild Id : ĠString , Ġbuilder : ĠText Channel Create Builder . () Ġ-> ĠUnit ): ĠDiscord Channel Ġ{ ĊĠĠĠ Ġval Ġcreate Builder Ġ= ĠText Channel Create Builder (). apply ( builder ) ĊĠĠĠ Ġreturn Ġcreate Guild Channel ( guild Id , Ġcreate Builder . to Request (), Ġcreate Builder . reason ) Ċ } Ċ Ċ suspend Ġinline Ġfun ĠGuild Service . create News Channel ( guild Id : ĠString , Ġbuilder : ĠNews Channel Create Builder . () Ġ-> ĠUnit ): ĠDiscord Channel Ġ{ ĊĠĠĠ Ġval Ġcreate Builder Ġ= ĠNews Channel Create Builder (). apply ( builder ) ĊĠĠĠ Ġreturn Ġcreate Guild Channel ( guild Id , Ġcreate Builder . to Request (), Ġcreate Builder . reason ) Ċ } Ċ Ċ suspend Ġinline Ġfun ĠGuild Service . create Voice Channel ( guild Id : ĠString , Ġbuilder : ĠVoice Channel Create Builder . () Ġ-> ĠUnit ): ĠDiscord Channel Ġ{ ĊĠĠĠ Ġval Ġcreate Builder Ġ= ĠVoice Channel Create Builder (). apply ( builder ) ĊĠĠĠ Ġreturn Ġcreate Guild Channel ( guild Id , Ġcreate Builder . to Request (), Ġcreate Builder . reason ) Ċ } Ċ Ċ suspend Ġinline Ġfun ĠGuild Service . create Category ( guild Id : ĠString , Ġbuilder : ĠCategory Create Builder . () Ġ-> ĠUnit ): ĠDiscord Channel Ġ{ ĊĠĠĠ Ġval Ġcreate Builder Ġ= ĠCategory Create Builder (). apply ( builder ) ĊĠĠĠ Ġreturn Ġcreate Guild Channel ( guild Id , Ġcreate Builder . to Request (), Ġcreate Builder . reason ) Ċ } Ċ