Skip to content

Feature/schiltz3/move utils #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/owner/createRoles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ICommand } from "wokcommands";
import { createRoles } from "../../rolesOps";
import { createRoles } from "../../utils/roleUtils";
import chalk from "chalk";
import { classModel } from "../../models/classModel";
import { staffModel } from "../../models/staffModel";
Expand Down
4 changes: 2 additions & 2 deletions commands/owner/csClassPoll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
import chalk from "chalk";
import { ICommand } from "wokcommands";
import { classModel, IClass } from "../../models/classModel";
import { checkForRoles } from "../../rolesOps";
import { sleep } from "../../util";
import { checkForRoles } from "../../utils/roleUtils";
import { sleep } from "../../utils/util";

// Splits any size list into lists of at most `max_list_len`
function split_list<T>(list: T[], max_list_len: number): T[][] {
Expand Down
2 changes: 1 addition & 1 deletion commands/owner/staffPoll.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from "chalk";
import { MessageEmbed, MessageActionRow, MessageSelectMenu } from "discord.js";
import { ICommand } from "wokcommands";
import { checkForRoles } from "../../rolesOps";
import { checkForRoles } from "../../utils/roleUtils";

export default {
name: "staffPoll",
Expand Down
2 changes: 1 addition & 1 deletion commands/owner/yearPoll.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from "chalk";
import { MessageEmbed, MessageActionRow, MessageSelectMenu } from "discord.js";
import { ICommand } from "wokcommands";
import { checkForRoles } from "../../rolesOps";
import { checkForRoles } from "../../utils/roleUtils";

export default {
name: "yearPoll",
Expand Down
2 changes: 1 addition & 1 deletion commands/user/clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ICommand } from "wokcommands";
import { classModel } from "../../models/classModel";
import { staffModel } from "../../models/staffModel";
import { yearModel } from "../../models/yearModel";
import { removeRole } from "../../rolesOps";
import { removeRole } from "../../utils/roleUtils";

export default {
name: "clear",
Expand Down
2 changes: 1 addition & 1 deletion commands/user/view.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from "chalk";
import { GuildMember } from "discord.js";
import { ICommand } from "wokcommands";
import { getUsersRoles } from "../../rolesOps";
import { getUsersRoles } from "../../utils/roleUtils";

export default {
name: "view",
Expand Down
2 changes: 1 addition & 1 deletion features/interactionCreate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Client, MessageEmbed, GuildMember } from "discord.js";
import { yearModel } from "../models/yearModel";
import { removeRole, addNewRole } from "../rolesOps";
import { removeRole, addNewRole } from "../utils/roleUtils";
import { staffModel } from "../models/staffModel";
import { classModel } from "../models/classModel";

Expand Down
2 changes: 1 addition & 1 deletion models/classModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mongoose, { Schema } from "mongoose";
import { IRole } from "../rolesOps";
import { IRole } from "../utils/roleUtils";

export interface IClass extends IRole {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion models/staffModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mongoose, { Schema } from "mongoose";
import { IRole } from "../rolesOps";
import { IRole } from "../utils/roleUtils";

export interface IStaff extends IRole {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion models/yearModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mongoose, { Schema } from "mongoose";
import { IRole } from "../rolesOps";
import { IRole } from "../utils/roleUtils";

export interface IYear extends IRole {
id: string;
Expand Down
6 changes: 3 additions & 3 deletions rolesOps.ts → utils/roleUtils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { GuildMember, Guild } from "discord.js";
import chalk from "chalk";
import { classModel } from "./models/classModel";
import { staffModel } from "./models/staffModel";
import { yearModel } from "./models/yearModel";
import { classModel } from "../models/classModel";
import { staffModel } from "../models/staffModel";
import { yearModel } from "../models/yearModel";
import { Model } from "mongoose";

export interface IRole {
Expand Down
File renamed without changes.