amog stuff

This commit is contained in:
TaxMachine 2022-07-26 03:56:24 -04:00
parent e1cab5243c
commit ece4aab11b
2 changed files with 47 additions and 3 deletions

View File

@ -113,13 +113,56 @@ proc messageCreate(s: Shard, m: Message) {.event(discord).} =
color: some 0x000066 color: some 0x000066
)] )]
) )
of "info":
discard await discord.api.sendMessage(
m.channel_id,
embeds = @[Embed(
title: some "TaxenHeimer bot",
description: some "```Discord bot that help to manage TaxenHeimer database queries```",
color: some 0x000066,
fields: some @[EmbedField(
name: "**Author**",
value: "```TaxMachine```",
inline: some true
),
EmbedField(
name: "**Language**",
value: "```nim```",
inline: some true
),
EmbedField(
name: "**Credits**",
value: "```\nPackage: https://nimble.directory/pkg/dimscord\nHelp: https://discord.gg/nim https://discord.gg/dimscord```"
)]
)]
)
proc guild_member_add(s: Shard, g: Guild, m: Member) {.event(discord).} = proc guild_member_add(s: Shard, g: Guild, m: Member) {.event(discord).} =
discard await discord.api.sendMessage( discard await discord.api.sendMessage(
"999502028227227810", "999502028227227810",
embeds = @[Embed( embeds = @[Embed(
title: some "Welcome to TaxenHeimer!", title: some "**Welcome**",
description: some fmt"Welcome <@{m.user.id}>! Hope you'll have a great time :coffee:", description: some fmt"Welcome <@{m.user.id}> to TaxenHeimer! Hope you'll have a great time :coffee:",
color: some 0x000066,
fields: some @[EmbedField(
name: "Member Count",
value: "```\n" & $g.members.len & "\n```"
)]
)]
)
discard discord.api.addGuildMemberRole(
g.id,
m.user.id,
"999538053943140463",
"Joining"
)
proc guild_member_remove(s: Shard, g: Guild, m: Member) {.event(discord).} =
discard await discord.api.sendMessage(
"1001391863263150150",
embeds = @[Embed(
title: some "**Goodbye**",
description: some fmt"Goodbye {m.user.username} :brain: :clown:",
color: some 0x000066, color: some 0x000066,
fields: some @[EmbedField( fields: some @[EmbedField(
name: "Member Count", name: "Member Count",

View File

@ -1,3 +1,4 @@
--threads:on --threads:on
switch("d", "release") switch("d", "release")
switch("d", "ssl") switch("d", "ssl")
switch("o", "bin/scanner")