la-cosa-nostra
Version:
A Mafia bot designed to run in Discord - beware the traitors and the lies!
25 lines (15 loc) • 532 B
JavaScript
var lcn = require("../../../../../source/lcn.js");
var rs = lcn.rolesystem;
module.exports = function (actionable, game, params) {
var config = game.config;
var player = game.getPlayerByIdentifier(actionable.to);
var channel = game.getChannel("mafia");
var member = player.getGuildMember();
if (!member) {
console.log("Attempting to close chat to non-existent Mafia!");
return true;
};
channel.overwritePermissions(member, config["base-perms"]["read"]);
// Destroy this instance
return true;
};