for k in pairs(metadmin.plombs) do
local k, row = sub2:AddSubMenu(k)
row:SetTextInset(10,0)
for n,v in pairs(metadmin.plombs.k) do
k:AddOption(v, function()
net.Start("metadmin.order")
net.WriteEntity(line.ply)
net.WriteBool(true)
net.WriteString(n)
net.SendToServer()
tabs:Remove()
end):SetTextInset(10,0)
end
end
bad argument #1 to 'pairs'
for n,v in pairs(metadmin.plombs.k) do
async edit(data, reason) {
if (data.channel) {
data.channel = this.guild.channels.resolve(data.channel);
if (!data.channel || data.channel.type !== 'voice') {
throw new Error('GUILD_VOICE_CHANNEL_RESOLVE');
}
data.channel_id = data.channel.id;
data.channel = undefined;
} else if (data.channel === null) {
data.channel_id = null;
data.channel = undefined;
}
if (data.roles) data.roles = data.roles.map(role => (role instanceof Role ? role.id : role));
let endpoint = this.client.api.guilds(this.guild.id);
if (this.user.id === this.client.user.id) {
const keys = Object.keys(data);
if (keys.length === 1 && keys[0] === 'nick') endpoint = endpoint.members('@me').nick;
else endpoint = endpoint.members(this.id);
} else {
endpoint = endpoint.members(this.id);
}
await endpoint.patch({ data, reason });
const clone = this._clone();
data.user = this.user;
clone._patch(data);
return clone;
}