fix webhooks sending (upstream bug)
This commit is contained in:
		
							parent
							
								
									07b9bab5ec
								
							
						
					
					
						commit
						1591bfc578
					
				
					 4 changed files with 46 additions and 21 deletions
				
			
		| 
						 | 
				
			
			@ -9,7 +9,7 @@ const api = sync.require("../../matrix/api")
 | 
			
		|||
 * @param {import("discord-api-types/v10").RESTGetAPIGuildResult} guild
 | 
			
		||||
 */
 | 
			
		||||
async function createSpace(guild) {
 | 
			
		||||
	const roomID = api.createRoom({
 | 
			
		||||
	const roomID = await api.createRoom({
 | 
			
		||||
		name: guild.name,
 | 
			
		||||
		preset: "private_chat",
 | 
			
		||||
		visibility: "private",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ module.exports = {
 | 
			
		|||
		/** @ts-ignore @type {import("discord-api-types/v10").APIGuildChannel} */
 | 
			
		||||
		const channel = client.channels.get(message.channel_id)
 | 
			
		||||
		const guild = client.guilds.get(channel.guild_id)
 | 
			
		||||
		if (message.guild_id !== "112760669178241024") return // TODO: activate on other servers (requires the space creation flow to be done first)
 | 
			
		||||
		if (message.guild_id !== "112760669178241024" && message.guild_id !== "497159726455455754") return // TODO: activate on other servers (requires the space creation flow to be done first)
 | 
			
		||||
		sendMessage.sendMessage(message, guild)
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue