DSharpPlus/Entities/Guild/DiscordGuild.cs
/// <summary>
/// Gets this guild's widget image.
/// </summary>
/// <param name="bannerType">The format of the widget.</param>
/// <returns>The URL of the widget image.</returns>
Gets this guild's widget image.
Gets this guild ' s widget image .
public string GetWidgetImage(WidgetType bannerType = WidgetType.Shield)
        {
            string param;
            switch (bannerType)
            {
                case WidgetType.Banner1:
                    param = "banner1";
                    break;
                case WidgetType.Banner2:
                    param = "banner2";
                    break;
                case WidgetType.Banner3:
                    param = "banner3";
                    break;
                case WidgetType.Banner4:
                    param = "banner4";
                    break;
                default:
                    param = "shield";
                    break;
            }
            return $"{Net.Endpoints.BASE_URI}{Net.Endpoints.GUILDS}/{this.Id}{Net.Endpoints.WIDGET_PNG}?style={param}";
        }
public string GetWidgetImage ( WidgetType bannerType = WidgetType . Shield ) { string param ; switch ( bannerType ) { case WidgetType . Banner1 : param = " " ; break ; case WidgetType . Banner2 : param = " " ; break ; case WidgetType . Banner3 : param = " " ; break ; case WidgetType . Banner4 : param = " " ; break ; default : param = " " ; break ; } return $" { Net . Endpoints . BASE_URI } { Net . Endpoints . GUILDS } / { this . Id } { Net . Endpoints . WIDGET_PNG } ?style= { param } " ; }
Gets this guild's widget image.
Gets this guild ' s widget image .
The URL of the widget image.
The URL of the widget image .
bannerType
WidgetType
The format of the widget.
The format of the widget .