Skip to content

Commit

Permalink
Merge pull request #12 from CHProducts/dev
Browse files Browse the repository at this point in the history
いろいろ
  • Loading branch information
MotiCAT authored Jan 9, 2024
2 parents c1368cf + 9b1336b commit 751432f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Events/onMessageCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { readFileSync } from 'fs';

config();

const prefix = 'mt!';
const prefix = 'mc!';

export async function onMessageCreate(message: Message): Promise<Awaitable<void>> {
if (bannedUsers.includes(message.author.id)) return;
Expand Down
13 changes: 13 additions & 0 deletions src/Events/onReady.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,17 @@ export function onReady(client: Client) {
'MB'
// Quote from: https://github.com/Nich87/Faith
});

const activities = ['mc!help Created By CH Products', `${client.guilds.cache.size} Servers | ${client.guilds.cache.reduce((a, b) => a + b.memberCount, 0)} Users`,];

let currentActivityIndex = 0;

setInterval(() => {
const nextActivityIndex = (currentActivityIndex + 1) % activities.length;
const nextActivity = activities[nextActivityIndex];

client.user?.setActivity(nextActivity);

currentActivityIndex = nextActivityIndex;
}, 10000);
}
3 changes: 1 addition & 2 deletions src/interactions/user.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ChatInputCommandInteraction, EmbedBuilder, GuildMember } from 'discord.js';

export async function userCommand(interaction: ChatInputCommandInteraction) {
const member =
(interaction.options.getMember('member') as GuildMember | undefined) ?? (interaction.member as GuildMember);
const member = (interaction.options.getMember('user') as GuildMember) ?? (interaction.member as GuildMember);
const createdDate = new Date(member.user.createdAt).toLocaleString('ja-JP', { timeZone: 'Asia/Tokyo' });
const nickname = member.nickname ?? 'なし';
if (!member.joinedAt) return;
Expand Down

0 comments on commit 751432f

Please sign in to comment.