Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
NoComment edited this page Oct 31, 2022 · 3 revisions

Welcome to the Discord Moderation Actions (DMA) wiki!

Here you can find information on how to utilise each function in DMA

Example Action:

This is a brief example of how to write an action

Note this code will not compile immediately, minor changes to suit your bot should be made. Information about actions can be found on wiki pages

ban("User ID goes here") {
	reason = "Being very rude to people"
	logPublicly = true
	sendActionLog = true
	sendDm = false
	removeTimeout = true
	deleteMessageDuration = DateTimePeriod(days = arguments.messages)
	loggingChannel = Config.getLoggingChannel()
	actionEmbed {
		title = "Banned a user"
		description = "${userId} has been banned!"
		timestamp = Clock.System.now()
		field {
			name = "Days of messages deleted:"
			value = deleteMessageDuration.days
			inline = false
		}
	}

	publicActionEmbed {
		title = "Banned a user"
		description = "${userId} has been banned!"
		color = DISCORD_BLACK
	}
}
Clone this wiki locally