mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 07:29:33 +00:00 
			
		
		
		
	Adding deprecation message when using message commands.
This commit is contained in:
		@@ -27,8 +27,18 @@ module.exports = {
 | 
				
			|||||||
        const permissions = msg.channel.permissionsFor(msg.client.user);
 | 
					        const permissions = msg.channel.permissionsFor(msg.client.user);
 | 
				
			||||||
        if (!permissions.has('EMBED_LINKS')) return msg.channel.send(client.messages.noPermsEmbed);
 | 
					        if (!permissions.has('EMBED_LINKS')) return msg.channel.send(client.messages.noPermsEmbed);
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					            let message = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            message.messageCommandsDeprecatedTitle = client.messages.messageCommandsDeprecatedTitle.replace("%client.user.username%", client.user.username);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					            const embed = new Discord.MessageEmbed()
 | 
				
			||||||
 | 
					                .setTitle(message.messageCommandsDeprecatedTitle)
 | 
				
			||||||
 | 
					                .setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
 | 
				
			||||||
 | 
					                .setColor(client.config.embedColor)
 | 
				
			||||||
 | 
					                .setDescription(client.messages.messageCommandsDeprecatedDescription)
 | 
				
			||||||
 | 
					                .setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            msg.channel.send({ embeds: [embed] });
 | 
				
			||||||
        } catch (error) {
 | 
					        } catch (error) {
 | 
				
			||||||
            msg.reply(client.messages.runningCommandFailed);
 | 
					            msg.reply(client.messages.runningCommandFailed);
 | 
				
			||||||
            console.error(error);
 | 
					            console.error(error);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,5 +36,7 @@ module.exports = {
 | 
				
			|||||||
    statusField3: "Uptime",
 | 
					    statusField3: "Uptime",
 | 
				
			||||||
    statusField4: "Version",
 | 
					    statusField4: "Version",
 | 
				
			||||||
    statusField5: "Hosted by",
 | 
					    statusField5: "Hosted by",
 | 
				
			||||||
    errorStationURL: "Station can't be URL"
 | 
					    errorStationURL: "Station can't be URL",
 | 
				
			||||||
 | 
					    messageCommandsDeprecatedTitle: "%client.user.username%",
 | 
				
			||||||
 | 
					    messageCommandsDeprecatedDescription: "We recommend you to reauthorize our bot with clicking invite link because Discord is planning to remove message content from verified bots [Read More](https://support-dev.discord.com/hc/en-us/articles/4404772028055) \n\n  **Invite Bot** \n https://wgi.fi/radiox_invite \n\n This bot is now supporting slash commands, you need to start to use them instead. Type / into message box in Discord and select bot you want to use. Remember to be careful because there are a few bugs here and there in Discord."
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
		Reference in New Issue
	
	Block a user