Merge branch 'development' of github.com:ClicksMinutePer/Nucleus into development

pull/14/head
TheCodedProf 3 years ago
commit 2eb1a07896

@ -319,6 +319,7 @@ const callback = async (interaction: CommandInteraction): Promise<unknown> => {
const newOut = await client.database.transcripts.createTranscript(messageArray, interaction, interaction.member as GuildMember);
const [code, key, iv] = await client.database.transcripts.create(newOut);
await interaction.editReply({
embeds: [
new EmojiEmbed()
@ -330,6 +331,7 @@ const callback = async (interaction: CommandInteraction): Promise<unknown> => {
components: [
new Discord.ActionRowBuilder<ButtonBuilder>().addComponents([
new ButtonBuilder().setLabel("View").setStyle(ButtonStyle.Link).setURL(`https://clicks.codes/nucleus/transcript/${code}?key=${key}&iv=${iv}`).setDisabled(!code),
])
]
});

@ -193,7 +193,9 @@ const callback = async (interaction: MessageContextMenuCommandInteraction) => {
)
)).map(message => message as Message);
const transcript = await client.database.transcripts.createTranscript(messageArray, interaction, interaction.member as GuildMember);
const [code, key, iv] = await client.database.transcripts.create(transcript);
await interaction.editReply({
embeds: [
new EmojiEmbed()

@ -16,6 +16,7 @@ const database = mongoClient.db();
const collectionOptions = { authdb: config.mongoOptions.authSource, w: "majority" };
const getIV = () => crypto.randomBytes(16);
export class Guilds {
guilds: Collection<GuildConfig>;
defaultData: GuildConfig;
@ -533,7 +534,6 @@ export class Premium {
const entry = await this.premium.findOne({ user: user });
return entry ? true : false;
}
async createUser(user: string, level: number) {
// console.log("Premium createUser");
await this.premium.insertOne({ user: user, appliesTo: [], level: level }, collectionOptions);

@ -82,6 +82,7 @@ export const Logger = {
console.log(log.hidden.guild)
const config = await client.database.guilds.read(log.hidden.guild);
console.log(config.logging.logs.channel)
if (config.logging.logs.channel) {
const channel = (await client.channels.fetch(config.logging.logs.channel)) as Discord.TextChannel | null;
const description: Record<string, string> = {};

Loading…
Cancel
Save