Example #1
0
 public async Task JoinMessageTest([Remainder] string str = "")
 {
     await Context.Channel.SendMessageAsync("Hi! Please take good care of me!", false, BasicUtil.GuildJoinEmbed("!").Build());
 }
Example #2
0
        // NAMIKO JOIN

        private async Task Client_JoinedGuild(SocketGuild arg)
        {
            DateTime now    = DateTime.Now;
            Server   server = ServerDb.GetServer(arg.Id) ?? new Server
            {
                GuildId  = arg.Id,
                JoinDate = now
            };

            server.LeaveDate = null;
            server.Prefix    = AppSettings.DefaultPrefix;
            await ServerDb.UpdateServer(server);

            if (server.JoinDate.Equals(now))
            {
                await BalanceDb.SetToasties(Client.CurrentUser.Id, 1000000, arg.Id);
            }

            SocketTextChannel ch = arg.SystemChannel ?? arg.DefaultChannel;

            try
            {
                await ch?.SendMessageAsync("Hi! Please take good care of me!", false, BasicUtil.GuildJoinEmbed(server.Prefix).Build());
            }
            catch { }
            await WebhookClients.GuildJoinLogChannel.SendMessageAsync($"<:TickYes:577838859107303424> {Client.CurrentUser.Username} joined `{arg.Id}` **{arg.Name}**.\nOwner: `{arg.Owner.Id}` **{arg.Owner}**");
        }