(guild: BotGuild)
| 30 | }; |
| 31 | |
| 32 | async function addToServer(guild: BotGuild) { |
| 33 | const resp = await session.apiClient.addPluginToGuild(plugin!.id, guild.guild.id, { auto_update: true }); |
| 34 | setAddingToServer(null); |
| 35 | if (isErrorResponse(resp)) { |
| 36 | setAddError(resp.response?.description ?? "unknown error"); |
| 37 | } else { |
| 38 | setAddedToServer(guild); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | |
| 43 | return <> |
no test coverage detected